Convert from varchar to decimal
Posted on 2003-10-21
i have a field which is stored as a varchar(30). I need it as varchar as the value can be characters or numbers etc.
in some case i need to add two of these fields when the text value are deciamls e.g. '.75' to do this i need to change them to decimals first. i have tried Cast('0.75' as DECIMAL(28,9)) but it gives me 1.00000000. it seems to be rounding to the nearest whole number. can anyone help?