This content has been marked as final. Show 4 replies
put the sysdate in double quotes.
ei. SPF_LAST_BATCH_START_TS "SYSDATE"
SPF_LAST_BATCH_START_TS SYSDATEPlease read about [url http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96652/ch06.htm#1008281]Setting a Column to an Expression Value in the manual.
Putting SYSDATE inside double quotes worked, as long as I also add a TRAILING NULLCOLS statement to the script (otherwise it generates errors).
The documentation that I have says that SYSDATE is an SQL*Loader keyword that can be used to create a generated field, the same as RECNUM or CONSTANT, and as such I should be able to use it rather than having to use the double quotes to call the system sysdate function. But in any case, it's working now, so thanks for your help!
>Putting SYSDATE inside double quotes worked, as long as I also add a TRAILING NULLCOLS statement to the script (otherwise it generates errors).
I don't think TRAILING NULLCOLS has something to do with double quotes. The TRAILING NULLCOLS clause tells SQL*Loader to treat any relatively positioned columns that are not present in the record as null columns. It clearly indicates that there are some records in your data file that do not have necessary columns to match up against the columns in your loader definition.