Question
SQL Server Question
I have a table in sql server. One column is quantity,
datatype int and the other is price, datatype decimal. For cfinput,
both are text and I predisplay 0.00 to let the user know the
format.
What is happening now is that users are entered 1.5, etc., into the quantity field and the insert blows up because of the datatype. So I changed the quantityt datatype from int to decimal so it will accept 1.5. However, when I look in the table, the value is stored as 2 (it will round up or down) instead of 1.5. and displays as 2. The price works and looks fine, but the quanity does not work.
What do I need to do to retain the decimal, and what affect will that have on existing data that was previously int ?
What is happening now is that users are entered 1.5, etc., into the quantity field and the insert blows up because of the datatype. So I changed the quantityt datatype from int to decimal so it will accept 1.5. However, when I look in the table, the value is stored as 2 (it will round up or down) instead of 1.5. and displays as 2. The price works and looks fine, but the quanity does not work.
What do I need to do to retain the decimal, and what affect will that have on existing data that was previously int ?
