The format they currently are in is "13/08/03". I have already been able to extract the information incluidng order_no into excel using microsoft query, and now have manipulated them into the format "13-AUG-03".
All I want to do now is put them back into oracle.
I've worked out what my problem is! Oracle (as you all will know and I should have remembered!) stores dates in the format 13-AUG-03, but my Supplier_ref column is storing the data 13/08/03, therefore causing the "invalid month" error. Now that I have solved that mystery, my next...
I used the amended script of dima's as the first one just scrolled and scrolled.
Routine ran and did not find any dodgy data, but when I try my to-date command I still get an invalid month error.
The supplier_ref field was originally a 20 character text field on a Sage line 500 database...
declare
mRowid rowid;
mDate date;
begin
for f in (select rowid, supplier_ref from poheadm) loop
mRowid := f.rowid;
mDate := to_date(f.supplier_ref);
end loop;
exception
when others then
dbms_output.put_line('Rowid you need is '||mRowid);
end;
I got the following output...
I have a similar problem when running Cognos Impromptu and oracle 8i database. I have "tweaked" the above script to fit by data structure and found some erroneous values which I have updated. BUT I am still getting the invalid month problem.
Anybody got any other ideas?
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.