loading

심재운 블로그

반응형

 

OPENQUERY 를 이용한 insert ~ select 구문

 

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')

 

참고자료.

blog.naver.com/PostView.nhn?blogId=ezmis&logNo=130012109082

 

Openquery를 이용한 Update, Delete, Insert

Openquery를 이용한 Update, Delete, Insert 종종 MS SQL 관계 커뮤니티의 질문게시판에 Openque...

blog.naver.com

 

반응형

공유하기

facebook twitter kakaoTalk kakaostory naver band

댓글

비밀글모드

  1. 시라소니
    퍼갈게요 감사합니다.
    2014.04.14 18:41