[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Converting a DB value into a # variable
- Subject: Converting a DB value into a # variable
- From: "Anderson, Carrie B" <AndersonCB@CORNING.COM>
- Date: Thu, 5 Feb 1998 16:34:08 -0500
I'm having a problem with extra numbers being added to the end of
numeric fields selected from the database (I'm working with PeopleSoft
HR v6.01).
I select HOURLY_RT (Nbr, 12.6) from the JOB table into &hourly_rt
when I display &hourly_rt it = 18.3
let #hourly_rt = &hourly_rt
when I display #hourly_rt it = 18.300000
This seems OK because the number is a 12.6, but when I use #hourly_rt in
a select statement from PAY_EARNINGS, pulling the earnings row for the
employee with an hourly rate of 18.3, it doesn't get any rows, even
though there is a row there to select. I know that all other where
criteria are correct and that the hourly rate is what is causing the
problem.
What I found is that the actual value of #hourly_rt is
18.300000000000001, but only shows 18.300000 because of the formatting.
Substr, rounding, and edit masks don't work, so I don't think it is a
formatting problem. If I use the &hourly_rt in my second select
statement, it works, but I need to use #hourly_rt in the select because
it is being called from other places (where hourly rate is an override
value instead of the database value).
It seems like the problem comes when I convert from & to #, but I don't
know. The wierd thing is that it only happens for some rates, and not
others. If anybody has any ideas, please let me know.
Thanks,
Carrie Anderson