You can also use floor and ceil functions. Given your examples, precisely what do you want the outcome to be?
Main Topics
Browse All TopicsHow do I convert decimal data type to integer and char(8) data types
table name
titles
column name
PRICE
21.99
19.95
39.95
12.99
6.95
19.95
23.95
10
13.95
This is an example from the internet that I tried, without success
SELECT SUBSTRING(price, 1, 30) AS price
FROM titles
WHERE CONVERT(char(8))
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: sjwalesPosted on 2008-11-12 at 12:20:48ID: 22943708
For converting to characters use the to_char function.
m/oracle/f unctions/t o_char.php
m/oracle/f unctions/r ound_nbr.p hp
m/oracle/f unctions/t runc_nbr.p hp
Syntax with examples here: http://www.techonthenet.co
For decimal to integer what are you planning on doing with the decimal pieces since integers by definition are whole numbers.
If you want to round to the nearest whole number use the ROUND function:
http://www.techonthenet.co
If you just want to chop them off use the TRUNC function:
http://www.techonthenet.co