DB2 STAGE - Difference between user defined sql and insert
Posted: Tue Jun 05, 2012 7:34 am
What is the main difference in using the the user defined sql and a regular insert statement. I was debugging a job that wasn't working as expected and noticed that the developer had the write mode set to 'USER DEFINED SQL' for a very basic insert using job parameters. While using the same insert sql I changed the write mode to insert and noticed that the sql started acting as we though it should. Are there any under-lying differences between the two write modes?
SQL
*************************************************************
INSERT INTO #DATAREP_PARAMS.DATA_SCHEMA#.#TABLE_ROOT#_NORM_BLOCKED
(INSERTED, LSSI_RECID, LAST_REFRESHED,SUPPLIER_REGION_NUM, REASON) VALUES
('#PROCESS_START#', ORCHESTRATE.LSSI_RECID, '#PROCESS_START#', #REGION_NUM#, ORCHESTRATE.MATCH_CODE)
*************************************************************
SQL
*************************************************************
INSERT INTO #DATAREP_PARAMS.DATA_SCHEMA#.#TABLE_ROOT#_NORM_BLOCKED
(INSERTED, LSSI_RECID, LAST_REFRESHED,SUPPLIER_REGION_NUM, REASON) VALUES
('#PROCESS_START#', ORCHESTRATE.LSSI_RECID, '#PROCESS_START#', #REGION_NUM#, ORCHESTRATE.MATCH_CODE)
*************************************************************