dbTalk Databases Forums  

Converting a type (e.g. Decimal) BEFORE writing to ResultSet ?

comp.databases.oracle comp.databases.oracle


Discuss Converting a type (e.g. Decimal) BEFORE writing to ResultSet ? in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
George Dainis
 
Posts: n/a

Default Converting a type (e.g. Decimal) BEFORE writing to ResultSet ? - 02-15-2005 , 06:48 PM






As well known a DATE or TIMESTAMP type can be converted (to VARCAHR) after selection but BEFORE
writing to the ResultSet by using the CONVERT function e.g.

SELECT CONVERT(char(10), MYTIMESTAMP, 101)) FROM ... WHERE ....

Is there something similar if the original field is a DECIMAL/NUMERIC field?

E.g.

SELECT DEC_CONVERT(char(30), MYDECIMAL, '###########0.00') FROM ..... WHERE ....

George


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.