Hi,
I have data in the format of server, process, day, time, cpu and value which I am loading into a database table using sqlldr. The day is in the format of DD/MM/YYYY and time is HH24:MI. I am trying to introduce a new column called TIMESTMP of type TIMESTAMP so that I can build an index on this to improve performance of queries. I have been able to do this on a static table I created but when I try to adjust my sqlldr control file to load data I am getting the following error: Column not found before end of logical record (use TRAILING NULLCOLS)
My control file for sqlldr had:
append into table mytable
fields terminated by "," optionally enclosed by "'"
( server, process, cpu, day DATE 'MM/DD/YYYY', time, value)
but now that I want to load to column TIMESTMP I have:
append into table mytable
fields terminated by "," optionally enclosed by "'"
( server, process, cpu, day DATE 'MM/DD/YYYY', time, value, timestmp "(to_timestamp((day||''||time), 'MM/DD/YYYY hh24:mi'))")
I can see what the error means as my input file only has elements for server, process, cpu, time and value and does not have a timestamp field. However, there must be a way to reuse these values to populate the timestamp.
Please help,
Toddyl
I have data in the format of server, process, day, time, cpu and value which I am loading into a database table using sqlldr. The day is in the format of DD/MM/YYYY and time is HH24:MI. I am trying to introduce a new column called TIMESTMP of type TIMESTAMP so that I can build an index on this to improve performance of queries. I have been able to do this on a static table I created but when I try to adjust my sqlldr control file to load data I am getting the following error: Column not found before end of logical record (use TRAILING NULLCOLS)
My control file for sqlldr had:
append into table mytable
fields terminated by "," optionally enclosed by "'"
( server, process, cpu, day DATE 'MM/DD/YYYY', time, value)
but now that I want to load to column TIMESTMP I have:
append into table mytable
fields terminated by "," optionally enclosed by "'"
( server, process, cpu, day DATE 'MM/DD/YYYY', time, value, timestmp "(to_timestamp((day||''||time), 'MM/DD/YYYY hh24:mi'))")
I can see what the error means as my input file only has elements for server, process, cpu, time and value and does not have a timestamp field. However, there must be a way to reuse these values to populate the timestamp.
Please help,
Toddyl