varchar to NUMBER conversion problem
Moderators: chulett, rschirm, roy
varchar to NUMBER conversion problem
We have a column PROD_KEY which is defined as NUMBER in the table, its allowed to have NULL in it. when we receive data in a file, its received as VarChar, when we try to insert into table, it gives the following error, PendingSeqFile,0: Field "PROD_KEY" has import error and no default value; data: <empty>, at offset: 48, what do i need to do here, whats the best way to handle this. thx we use oracle9i
EDITED: After realizing its a px job.
Try this
Try this
Code: Select all
IF LEN(TRIM(in.PROD_KEY)) < 1 then SetNull() else in.PROD_KEY
Last edited by DSguru2B on Tue Jan 23, 2007 1:28 pm, edited 2 times in total.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.