Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert string into date column

soldstaticApr 6 2010 — edited Apr 6 2010
I'm writing a bash script that is supposed to insert a series of strings into a table. Problem is I may not know which column the date is in, so I don't want to hard code a to_date function in there.

For instance this row may come in to be inserted:
"06-APR-10 08:51:12","data","data","data","data","data","data","data","data"

Assuming the data is in the proper order, I'm just going to sub out the "," for ',' which will let me insert everything just fine, except obviously it borks on the date.

How do I insert the date this way as a string using the default internal call to to_date?? I know I can do it with '06-APR-10' and it works, but I need to get a little more specific with hour minute and second.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 4 2010
Added on Apr 6 2010
24 comments
4,532 views