Tuesday, May 29, 2012
SQL For creating select insert statement for - PeopleSoft
Below Oracle SQL can be used in peoplesoft for generating the
select insert statement. Input for the SQL is peoplesoft query name.
---------------------------------------------------------------------
SELECT 'INSERT INTO PS_'||RECNAME ||' ( ' ||RTRIM(XMLAGG (XMLELEMENT (b, FIELDNAME || ',')).EXTRACT ('//text()'), ',')||')'||
' SELECT ' ||RTRIM(XMLAGG (XMLELEMENT (b, FIELDNAME || ',')).EXTRACT ('//text()'), ',')||' FROM PS_'||RECNAME ||
' WHERE ' AS GENSQL FROM PSRECFIELDDB
WHERE RECNAME = 'SCB_PCS_DIM_CFN' GROUP BY RECNAME
---------------------------------------------------------------------
Subscribe to:
Posts (Atom)