Solved

Type Casting in oracle

Posted on 2003-11-05
3
1,554 Views
Last Modified: 2008-02-01
How do u type cast in oracle.
I want to convert a decimal value into integer.In Access we have CINT.What is the equivallent in Oracle
0
Comment
Question by:SusanBinoy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
grim_toaster earned 20 total points
ID: 9685884
There are a number of ways to do this, th simplest of which are:

ceil(76.76)   - returns the smallest integer larger than (or equal) to the value passed (eg 77 in this case).
floor(76.76) - returns the smallest integer smaller than (or equal) to the value passed (eg 76 in this case).
round(76.76, 0) - rounds of the number to the specified precision (the second parameter) (eg 77 in this case).

0
 
LVL 7

Expert Comment

by:grim_toaster
ID: 9685890
Or trunc(76.77, 0) - which truncates the value to the specified precision.
0
 

Author Comment

by:SusanBinoy
ID: 9685929
Thanks Grim that was a quick answer.
It is working I was searching for the answer for a long time
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question