i am getting date fields in the file as 12252001
i want the field to load into oracle table
i am using timestamp() and iconv/oconv to insert into oracle table.
but i am getting null values when it is inserted.
how to resolve this issue
populating date column to table
Moderators: chulett, rschirm, roy
Re: populating date column to table
You will need to handle the nulls before they are converted into the appropriate date format. Use the Null Handling function provided to check if the incoming value is a null and if so convert or handle the null as you want them in your target. Else (i.e, if incoming value is not null) then go ahead with the iconv/oconv conversion.dr46014 wrote:i am getting date fields in the file as 12252001
i want the field to load into oracle table
i am using timestamp() and iconv/oconv to insert into oracle table.
but i am getting null values when it is inserted.
how to resolve this issue
Depends upon whats the oracle date field. Is it just date or timestamp
If its date use this
If its timestamp then use this
If its date use this
Code: Select all
OCONV(ICONV(in.Col,"DMDY[2,2,4]"),"D-YMD[4,2,2]")
Code: Select all
OCONV(ICONV(in.Col,"DMDY[2,2,4]"),"D-YMD[4,2,2]"):" 00:00:00"
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
TIMESTAMP() converts Internal Date format to Timestamp format (YYYY-MM-DD 00:00:00). You were not providing it internal format. If you really want to use TIMESTAMP() then do this
Code: Select all
TIMESTAMP(ICONV(in.Col,"DMDY[2,2,4]"))
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.