First I know storing dates in a varchar is bad, hence this disaster. I get stuck with what was left behind.
All I need to do is pull data out of this table for a report but I need the date to be in the format of 2008-01-23. I tried to use the to_date function with the format specified as...
I am trying to convert a varchar2 field into a specific date. The values in the column have the format of 01/23/2008 and I would like it to be 2008-01-23.
I have tried select to_date('column_name', 'YYYY-MM-DD') but I get an error returned from Oracle that it is an invalid month.
Appreciate...
I actually did figure this out right before reading your post but it isn't as nice as yours:
perl -pi -e "s#((/\d)Z1,)#${2}2001,#g"
i did this after reading about limitations of using /n and that $n instead
The comment pertained to being outside the pattern. I admit I don't fully understand...
all i have tried was the simple sub command which is removing all hyphens:
perl -pi -e "s#-##g"
I know that isn't the answer. I have been searching for something that would do the subs, but only on the values first and fourth.
If you point me in the right direction I don't mind doing...
I have a file of records that look like this:
123-456,RTY,76-78,12-09-87,key
I would like to remove the hyphens from the first, and fourth values as delimited by commas but not the third value. So I would like to have the record look like this:
123456,RTY,76-78,120987,key
Can I do this...
I have records in a file that look like this:
IPOD,YAHOO,0033092909,50/4Z1,technology_102
I would like to convert the 4Z1 to 42001 so the complete record would look like this:
IPOD,YAHOO,0033092909,50/42001,technology_
So essentially what I am trying to do is find records that have a slash /...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.