Re: DBDATE / DBMONEY in SQL ändern ??
- From: Carsten Haese <carsten@xxxxxxxxxxx>
- Date: Tue, 10 Jul 2007 09:24:19 -0400
On Tue, 2007-07-10 at 12:59 +0000, Ian Michael Gumby wrote:
From: Carsten Haese <carsten@xxxxxxxxxxx>[Bitte, Ich spreche nicht Deutsches.]
On Tue, 2007-07-10 at 09:39 +0000, hoffiman@xxxxxxxxxxxxxx wrote:
In English:This doesn't make sense.
I'm not aware of a way to set the date format with an SQL command. One
possibility would be to load the data into an auxiliary table that is
identical to the target table except that date columns are replaced by
char(10) columns. You can then transfer the data to the target table and
translate the date columns with mdy(x[6,7],x[9,10],x[1,4]) into real
dates.
Hope this helps,
--
Maybe that's because you nicht sprechen Deutsch ;)
The date is stored in an intermediate format and should be formattable via
regex from the SQL statement. (Sorry my mind is a bit garbled from doing too
many different database things as well as languages.)
There should be an SQL function that would allow you to format the date from
the internal format to a more readable string on the fly.
The OP wants to go the other way. He has an unload file with dates in
yyyy-mm-dd format and wants to load them into a date column without
setting the DBDATE environment variable. I suggested one way of doing
that. It probably is neither the only way nor the best way to do this,
but it is a way to achieve what the OP asked for.
--
Carsten Haese
http://informixdb.sourceforge.net
.
- Prev by Date: Re: DBDATE / DBMONEY in SQL ändern ??
- Next by Date: Re: DBDATE / DBMONEY in SQL ändern ??
- Previous by thread: Re: DBDATE / DBMONEY in SQL ändern ??
- Next by thread: server studio 6.0 to 6.1 upgrade
- Index(es):
Relevant Pages
|