All,
I would like to restrict my data load using the SQL Loader Control file WHEN clause to look at the first 2 characters of a table column value. This is a character delimited file and needs to load only if the first 2 characters of a table column has specific value in it. If the first 2 characters are not as needed, we need to ignore those records.
I know that we will not be able to use the SUBSTR function in the SQL Loader control file WHEN clause. What would be the alternative to achieve this functionality. I don't want to load everything and then delete the ones matching the criteria as its a huge file to load.
to achieve the functionality something like this...
Eg.
OPTIONS (SKIP=1)
LOAD DATA
APPEND
INTO TABLE MY_TABLE1
WHEN RECORD_TYPE_CODE ='05'
AND SUBSTR(APPRTN_ID,1,2) ='75'
Please suggest and provide me inputs.
Thanks & Regards,