Link to home
Start Free TrialLog in
Avatar of mnb951
mnb951

asked on

convert decimal data type to integer and char(8) data types

How 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))
SOLUTION
Avatar of Steve Wales
Steve Wales
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I find it interesting that you accepted answers, but gave a grade of B, when the responders requested you to post some sample data and your expected output. Had you done so, I'm sure you would have been provided an answer worthy of a grade of A.