[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: cannot get rid of decimal point



You just multiple by 100. For instance, 12.45 * 100 then you move result
value to $var

-----Original Message-----
From: Charu Srinivas [mailto:C._Srinivas/dsisys/US@DSISYS.COM]
Sent: Wednesday, October 28, 1998 2:42 PM
To: Multiple recipients of list SQR-USERS
Subject: cannot get rid of decimal point


Hi everyone,

I am using Oracle and SQR.

I m trying to create a flat file with values from the PeopleSoft table. One
of the fields is numeric. I want it to look like 9(7)V99
i.e without any decimal points and it should be left padded with zeros.(
e.g 12.54 should look like 000001254)
Then I move it to a character variable so that i can write it to the flat
file.

I tried using move #var to $var 0999999V99 but it gives me a decimal point
and right pads it with zeros i.e
12.54 looks like 12.5400000

If any of you have suggestions, I would greatly appreciate it.

Thanks in advance -Charu