Home > database >  The MERGE INTO prompt without permission
The MERGE INTO prompt without permission

Time:09-29

Inert, update, delete permissions, but not the MERGE INTO permissions

The MERGE INTO DIAGNOSIS @ tohis p
USING emr_diagnosis np
ON (p.P ATIENT_ID=np. PATIENT_ID and p.V ISIT_ID=np. VISIT_ID and conviction yourself IAGNOSIS_TYPE=np. DIAGNOSIS_TYPE and conviction yourself IAGNOSIS_NO=np. DIAGNOSIS_NO)
WHEN NOT MATCHED THEN
INSERT
VALUES
(np. PATIENT_ID,
Np. VISIT_ID,
Np. DIAGNOSIS_TYPE,
Np. DIAGNOSIS_NO,
Np. DIAGNOSIS_DESC,
Np. DIAGNOSIS_DATE,
Np. TREAT_DAYS,
Np. TREAT_RESULT,
Np. OPER_TREAT_INDICATOR,
Np. DIAGNOSIS_CODE,
Np. INSERT_INDICATOR,
Np. ADMISSION_CONDITION,
Np. DIAGNOSIS_CODE2)
WHERE np. Patient_id='0106853'
And np. Visit_id='1'
And replace (replace (np) DIAGNOSIS_DESC, '-', '), '-', ') is not null
The WHEN MATCHED THEN
The UPDATE
The SET conviction yourself IAGNOSIS_DESC=np DIAGNOSIS_DESC,
Conviction yourself IAGNOSIS_DATE=np DIAGNOSIS_DATE,
P.T REAT_RESULT=np TREAT_RESULT,
Conviction yourself IAGNOSIS_CODE=np DIAGNOSIS_CODE,
P.A DMISSION_CONDITION=np. ADMISSION_CONDITION
WHERE np. Patient_id='0106853'
And np. Visit_id='1'
And replace (replace (np) DIAGNOSIS_DESC, '-', '), '-', ') is not null;



The statement execution failure
Ora - 01031: insufficient privileges
Ora - 02063: following the line (from TOHIS)

CodePudding user response:

DIAGNOSIS @ tohis

The remote object, you can insert and modify the data?

CodePudding user response:

reference 1st floor wmxcn2000 response:
DIAGNOSIS @ tohis

The remote object, you can insert and modify the data?


Can I, under the same user can insert into DIAGNOSIS @ tohis, delete from DIAGNOSIS @ tohis, update DIAGNOSIS @ tohis

CodePudding user response:

I remember, is not very clear, in oracle9.2 have this problem, the original poster is which version of the library,

CodePudding user response:

reference jdsnhan reply: 3/f
I remember ah, is not very clear, in oracle9.2 have this problem, the original poster is which version of the library,



Oralce 11 g

CodePudding user response:

If there is update, there is no insert
9 I already support, but only support the select subquery,
If it is a single data record, can write the select... The from dual sub queries, but the merge is not allowed to update on the value of the column in the condition of can quote ORA - 38104 error, otherwise
  • Related