View previous topic :: View next topic
|
Author |
Message |
chennareddy
New User
Joined: 22 Dec 2005 Posts: 11
|
|
|
|
Hi,
I have executed one SQL query in REXX. In that one particular column is decimal. But rexx after executing the query shows that particular value without decimal point in it.
Could anyone please let me know who to change that value to contain decimal in it.
Can it be changed while executing the queryitself.
If not what is the other process.
Thanks,
Chennareddy |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
Can you simply divide by 100 to indicate the decimal?
Code: |
/* REXX */
TRACE "I"
NUMBER = 199375
DECNUM = NUMBER/100
SAY DECNUM
EXIT
|
Code: |
3 *-* NUMBER = 199375
>L> "199375"
4 *-* DECNUM = NUMBER/100
>V> "199375"
>L> "100"
>O> "1993.75"
5 *-* SAY DECNUM
>V> "1993.75"
1993.75
6 *-* EXIT
|
|
|
Back to top |
|
|
chennareddy
New User
Joined: 22 Dec 2005 Posts: 11
|
|
|
|
The above works fine..
I was wondering if there is a way to fetch the corrct format from SQL query itself.
If there is please let me know..
Thanks,
ChennaReddy |
|
Back to top |
|
|
|