RE: a math question

RE: a math question

 

  

Do this:

SQL> select trunc(col1/100) from test_tb;


Sandeep Dubey
-----Original Message-----
From: Benny Pei [mailto:[Email Address Removed] Tuesday, July 10, 2001 2:56 PM
To: LazyDBA.com Discussion
Subject: a math question


This is going to be a dumb one. :)

I have a column declared as int. I want to divide
int/100 but the number comes up with a decimal point.
How do I get only the integer part of this division?

e.g.

col1
----
100
101
102

SQL> select col1/100 from test_tb;

col1/100
--------
1
1
1

*NOT*
col1/100
--------
1
1.01
1.02

thanks,

benny

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page