SQL Loader query [message #378857] |
Fri, 02 January 2009 03:28 |
frog9697
Messages: 18 Registered: December 2008
|
Junior Member |
|
|
Hi there,
Hoping someone can help me with this, potentially somewhat obscure, problem. I have some data in a text file separated by delimiters, one field of which is a date and time in the form:
ddmmyyyy hhmmss.
I would like to load it into my table in the form mmyy. The data type of the field in question is varchar2 4 bytes. Is there a way I can do this?
Thanks very much,
F
|
|
|
|
|
|
Re: SQL Loader query [message #378892 is a reply to message #378857] |
Fri, 02 January 2009 05:20 |
frog9697
Messages: 18 Registered: December 2008
|
Junior Member |
|
|
Hi,
I've had a look at this but still a bit unsure of the syntax (as most of the examples I have come across relate to converting to a different date format, as opposed to converting to an integer). Would you happen to have an example?
Thanks,
F
|
|
|
|
Re: SQL Loader query [message #378906 is a reply to message #378899] |
Fri, 02 January 2009 08:29 |
frog9697
Messages: 18 Registered: December 2008
|
Junior Member |
|
|
Thanks very much, turned out to be more straightforward than I was expecting. For the record, in case anyone is interested, the following now works:
field_name "substr(:field_name, 3,2) ||''|| substr(:field_name, 7,2)",
|
|
|
|