V
vvenk
I am new to SQL and your help is very much appreciated.
The Table VISIT_TYPE has a o-M relationship with PATIENT_VISIT.
I am trying to update the fields, Amount_Billed_N in PATIENT_VISIT with the
Fee_N from VISIT_TYPE based on Visit_Type_CD_C.
I have the statement below:
UPDATE PATIENT_VISIT AS A
SET A.AMOUNT_BILLED_N =
(
SELECT B.Charge_N
FROM VISIT_TYPE AS B
WHERE B.Visit_Type_CD_C = A.Visit_Type_CD_C
)
WHERE A.INVOICE_NO_N IS NULL
When I try to execute the query, I get the error, "Operation must be an
updateable query" suggesting that the query may not be syntactically correct.
Can somebody help me?
Thanks.
Venki
The Table VISIT_TYPE has a o-M relationship with PATIENT_VISIT.
I am trying to update the fields, Amount_Billed_N in PATIENT_VISIT with the
Fee_N from VISIT_TYPE based on Visit_Type_CD_C.
I have the statement below:
UPDATE PATIENT_VISIT AS A
SET A.AMOUNT_BILLED_N =
(
SELECT B.Charge_N
FROM VISIT_TYPE AS B
WHERE B.Visit_Type_CD_C = A.Visit_Type_CD_C
)
WHERE A.INVOICE_NO_N IS NULL
When I try to execute the query, I get the error, "Operation must be an
updateable query" suggesting that the query may not be syntactically correct.
Can somebody help me?
Thanks.
Venki