Solved

Type Casting in oracle

Posted on 2003-11-05
3
1,535 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
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
grim_toaster earned 20 total points
Comment Utility
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
Comment Utility
Or trunc(76.77, 0) - which truncates the value to the specified precision.
0
 

Author Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

762 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now