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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George Dainis

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

    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(cha r(30), MYDECIMAL, '###########0.0 0') FROM ..... WHERE ....

    George

Working...