RE: SQL PLUS question
Posted in 1997
Chalu
I dont know how you can control the date format internally through =
Oracle, but on the flat file you could run a series of sed scripts to =
convert strings such as -Jan- to /01/, -Feb- to /02/, and so on till =
-Dec- to /12/. This will give you the date in Informix DMY2/ format =
(dd/mm/yy). This is assuming of course (1) that you are using Unix and =
(2) that you dont have character strings in the table that have strings =
like -Jan-, -Feb-, etc. The sed command would go like this.
sed -e 's/-Jan-/\\/01\\//'
-e 's/-Feb-/\\/02\\//'
...
-e 's/-Dec-/\\/12\\//' oracle_flat_file > informix_flat_file
If you dont have Unix, I am sure that your operating system would have =
something similar.
Hope this helps
Sujit Pal
----------
From: chalu kim[SMTP:chalu@ivillage.com]
Sent: Monday, January 27, 1997 1:56 PM
To: informix-list@rmy.emory.edu
Subject: SQL PLUS question
We are moving data from ORACLE to Informix; we are having a problem with
SQLPLUS while trying to dump the data to file. How can we control the
way SQLPLUS outputs a DATE type field. Currently when running a select
statement to output a DATE type field, it outputs in form of
DAY-MONTH-YEAR, EX: 27-JAN-97. Is there some way to have a DATE field
output in a format that INFORMIX dbload command could work with?
EX: MONTH-DAY-YEAR 01-27-97.