Here's a sample - TABLE_1 is form where we are fetching and TABLE_2 is into which we are populating. FIELD_3/4/5/6 are the variables holding XML data. PROC SQL FEEDBACK STIMER; CONNECT TO ORACLE AS AAA (USER = "&USER." PASS = "&PASSWD." PATH = "&DBPATH."); EXECUTE ( INSERT INTO TABLE_B ( FIELD_1, FIELD_2, FIELD_3, FIELD_4, FIELD_5, FIELD_6, ) SELECT ......, ......, XMLTYPE(FIELD_3), CASE WHEN FIELD_4 IS NULL THEN NULL ELSE XMLTYPE(FIELD_4) END, CASE WHEN FIELD_5 IS NULL THEN NULL ELSE XMLTYPE(FIELD_5) END, CASE WHEN FIELD_6 IS NULL THEN NULL ELSE XMLTYPE(FIELD_6) END FROM TABLE_1 ) BY AAA; EXECUTE ( COMMIT ) BY AAA; DISCONNECT FROM AAA; QUIT;
... View more