[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] RE: Rounding up to the nearest 1000 in SQR
Oh, goodness gracious. Not saying that about your question, but about the
quantity of different solutions offered! You apparently have handed us an
interesting challenge. Try this one:
let #rounded_sal = trunc((#sal + 999) / 1000,0) * 1000
Here are the values I tested as #sal, and the resulting #rounded_sal:
10000 10000.000000
10001 11000.000000
10010 11000.000000
10500 11000.000000
11000 11000.000000
19999 20000.000000
HTH,
Denise M. White
Sr. Software Engineer
Vicor
--__--__--
Message: 4
To: sqr-users@sqrug.org
From: "Jacqueline Smith" <Jacqueline_Smith@nexnet.navy.mil>
Date: Wed, 30 Jul 2003 09:49:18 -0400
Subject: [sqr-users] Rounding up to the nearest 1000 in SQR
Reply-To: sqr-users@sqrug.org
Please help !
I am fairly new to writing reports in SQR, I have to do some
calculations that will round up the salary to the next $1000.
I know about rounding after the decimal ,but is there a way in SQR
development to round to the next 1000, before the decimal place. I hope
this doesn't tick anyone off. Just trying to earn a living! Will greatly
appreciate any help I can get.
Thanks a million !
v/r
Jacquelin Smith
Telephone 631-4545
Code IH PeopleSoft
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users