INSERT INTO OPENQUERY (
ORACLE_AR,
'Select
XX_AR_CUSTOMER_INTERFACE_ID,
ACCOUNT_NUMBER,
CREDIT_APPROVE_DATE,
CREDIT_APPLICATION_TYPE,
CREATED_BY,
CREATION_DATE,
STATUS_CODE,
FROM APPS.XXAR_CUSTOMER_INTERFACE'
)
SELECT (
SELECT *
FROM openquery(ORACLE_AR_CNV_NEW_O,
'Select xxar.XX_AR_CUSTOMER_INTERFACE_ID_S.nextval from dual')
) AS ID,
sCustID,
Credit_Approval_Date,
Credit_App_Type,
Created_By_CTS,
Creation_Date,
Status_Code
FROM app.vwAutoCustomer_CreditApp_Process
OPENQUERY 를 이용한 INSERT, UPDATE, DELETE
INSERT openquery (
linked1,
'select num, names from Temp_1'
)
VALUES (
100,
'박찬호'
)
UPDATE openquery(linked1, 'select num from Temp_1 where num = 100')
SET num = 200
DELETE
FROM openquery(linked1, 'select num from Temp_1 where num = 200')