[AccessD] Oracle Pass Thru

Benson, William (GE Global Research, consultant) Benson at ge.com
Tue Jun 12 00:06:05 CDT 2012


I am a little ashamed at asking so many Oracle query syntax questions, I hope to be out of the woods soon. I would like either to make the non-pass thru query run faster or solve the syntax problem with the pass thru.


Non-pass-thru:
The following query, with linked tables Solarconnect_SID_consolidated_gib_view  and SOLARCONNECT_GIBIX_CUSTOMER_HIERARCHY seems to run, but it takes a long time. Presumably because they are odbc linked tables, but possibly also by poor query construction.


UPDATE Solarconnect_SID_consolidated_gib_view AS A 
INNER JOIN 
	(SELECT
		 SOLARCONNECT_SID_CONSOLIDATED_GIB_VIEW.SITE_DUNS_NO, 
		DOM.PARENT_CUSTOMER_DUNS
	FROM 	
		SOLARCONNECT_SID_CONSOLIDATED_GIB_VIEW 
	INNER JOIN 
		SOLARCONNECT_GIBIX_CUSTOMER_HIERARCHY AS DOM 
	ON 
		SOLARCONNECT_SID_CONSOLIDATED_GIB_VIEW.SITE_DUNS_NO = DOM.CHILD_CUSTOMER_DUNS
	WHERE 
			DOM.PARENT_CUSTOMER_TYPE="DOM" 
		AND 
			DOM.CHILD_CUSTOMER_TYPE="STE"
	)  AS B 

ON 

	A.Site_duns_no = B.Site_duns_no 
SET	 A.dom_customer_duns_no = B.parent_customer_duns;


I tried making it a pass thru, but then the syntax was rejected (note that when a passthru, the SOLARCONNECT prefix is not needed, that is only for linked tables):


UPDATE SID_consolidated_gib_view A 
INNER JOIN 
(
SELECT X.SITE_DUNS_NO, DOM.PARENT_CUSTOMER_DUNS
FROM 
SID_CONSOLIDATED_GIB_VIEW X
LEFT OUTER JOIN 
GIBIX_CUSTOMER_HIERARCHY DOM 
ON
X.SITE_DUNS_NO = DOM.CHILD_CUSTOMER_DUNS
WHERE 
DOM.CHILD_CUSTOMER_TYPE='STE'
AND
DOM.PARENT_CUSTOMER_TYPE='DOM'

)  B 



ON A.Site_duns_no = B.Site_duns_no 

SET A.dom_customer_duns_no = B.parent_customer_duns;



More information about the AccessD mailing list