Solved

Type Casting in oracle

Posted on 2003-11-05
3
1,548 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle SQL syntax check  without executing 6 107
upgrading Oracle 10g/ 11g / 11g R2 to Oracle 12c 25 89
Fill Null values 5 36
pl/sql parameter is null sometimes 2 24
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example, show how to take different types of Oracle backups using RMAN.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

749 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