using decode in SQL*Loader [message #447334] |
Sat, 13 March 2010 14:28 |
ziggy25
Messages: 206 Registered: July 2005
|
Senior Member |
|
|
For some reason, sql loader is raising an error for this line
CNT_CODE CHAR "decode(:CNT_CODE,'GB',:CNT_CODE,RPAD(:CNT_CODE,3)",
Basically what i want to do is, if the country code is 'GB' then dont change anything but if its not append a space to the country code and return a 3 character value.
The error that is generated is
Record 3: Rejected - Error on table WORLD_COUNTRIES.
ORA-00917: missing comma
There is nothing wrong with the source data because i have tested these different combinations both work fine
CNT_CODE CHAR "RPAD(:CNT_CODE,3)",
CNT_CODE CHAR,
its only when i use the DECODE function that it complains. Is it something obvious im missing?
[Updated on: Sat, 13 March 2010 14:36] Report message to a moderator
|
|
|
|
|
|