[Cialug] SQL question
Josh More
morej at alliancetechnologies.net
Tue Oct 4 09:13:57 CDT 2005
It is generally considered best practice to store data in the
default form, and reformat it as needed. In your case, I would
store the data as a timestamp and write an accessor function
or view that gives you the format you want.
--
-Josh More, RHCE, CISSP, NCLP
morej at alliancetechnologies.net
515-245-7701
>>>david.stout at marshallnet.com 10/04/05 9:11 am >>>
I have a timestamp like 2004-12-01 00:00:01.0000 and I need this
2004-12-01 00:00:1
I need to drop the zero before the 1 and all of them after it.
David Stout
Data Repository Analyst
----- Original Message -----
From: David Stout [mailto:david.stout at marshallnet.com]
Sent: 10/3/2005 3:18:45 PM
To: cialug at cialug.org
Subject: [Cialug] SQL question
>Is it possible to update a varchar column(empty) with a timestamp
column and truncate the trailing 0's
>
>This would be in DB2.
>
>Thank you,
>
>David Stout
>Data Repository Analyst
>
>
>Cialug mailing list
>Cialug at cialug.org
>http://cialug.org/mailman/listinfo/cialug
>
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20051004/77209722/attachment.htm
More information about the Cialug
mailing list