Home » SQL & PL/SQL » SQL & PL/SQL » Use of Round() function.....Ceiling () function (Oracle)
Use of Round() function.....Ceiling () function [message #307249] Tue, 18 March 2008 04:32 Go to next message
sandeep_shirsat
Messages: 3
Registered: September 2006
Location: NASIK
Junior Member

Hi all

How can we use ceiling() function of MS Access in ORacle ?..

I have foloowing query...

Round(43,1)= 43
ROund(43,-1)=40

I want
Round(43,..)=45
round(46,..)=50
I want to round off the figure 43, 46 to the next precision only....

This is possible with ceiling function of MS Access like

ceiling(43,5)=45
ceiling(46,5)=50
Is there any function which would act like ceiling()?
Please give me a reply urgent.......its very urgent

regards
sandeep
Re: Use of Round() function.....Ceiling () function [message #307254 is a reply to message #307249] Tue, 18 March 2008 04:42 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
This is NOT an expert question. Why did you post this in expert forum and not in newbie one?

It is clearly stated in the forum description: "Newbies should not post to this forum!"
Expert notion is defined in the sticky: Not an EXPERT? Post in the NEWBIES forum, NOT here
Rules are described in: OraFAQ Forum Guide
Follow them including about urgent words and multposting.

Regards
Michel
Re: Use of Round() function.....Ceiling () function [message #307267 is a reply to message #307249] Tue, 18 March 2008 05:12 Go to previous messageGo to next message
MarcS
Messages: 312
Registered: March 2007
Location: Antwerp
Senior Member
Damn, missed an urgent call again Embarassed Smile

Play around with simple operators like / and * and the Oracle-function CEIL

And when I say Play I mean: think and try
Re: Use of Round() function.....Ceiling () function [message #307268 is a reply to message #307254] Tue, 18 March 2008 05:13 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Hi,

Oracle has no built-in function for that, but you can achieve the desired result by using basic math. You were on the right track with the CEIL function, but this function is somewhat different from the one you know from Access. You might want to have a look at the Oracle manuals (http://tahiti.oracle.com).

read the previous reply
But there are other ways.

MHE

[Updated on: Tue, 18 March 2008 05:18]

Report message to a moderator

Re: Use of Round() function.....Ceiling () function [message #307294 is a reply to message #307254] Tue, 18 March 2008 06:13 Go to previous messageGo to next message
sandeep_shirsat
Messages: 3
Registered: September 2006
Location: NASIK
Junior Member

Sorry for the Posting in Experts group.....


Will take care... for the next postings

Regards

Sandeep
Re: Use of Round() function.....Ceiling () function [message #307295 is a reply to message #307268] Tue, 18 March 2008 06:17 Go to previous message
sandeep_shirsat
Messages: 3
Registered: September 2006
Location: NASIK
Junior Member

Thanks a lot

Its worked out...

regards

Sandeep

SELECT the_val
, the_val/5 diff_5
, ceil(the_val/5) ceil_diff_5
, ceil(the_val/5)*5 next_5_fold
FROM yourtable
/
Previous Topic: Find rowtype / record type dynamically
Next Topic: top 3 average sales
Goto Forum:
  


Current Time: Sun Feb 16 18:42:07 CST 2025