Hello,
Is there a way to convert varchar or char to float?
Thank youSELECT Convert(float, '1e3')-PatP|||Thank you, what is '1e3' and how to apply it my field?|||1e3 is a float constant. I picked it because it can't be a decimal, money, or any other numeric value, either CHAR or FLOAT and that's it.
-PatP|||I have a field in my table "SellTo" datatype set to varchar
value in the field 000021
how can I convert this field to a float(8)
Thank you|||Hello,
I have a query:
Select
cast(convert(char, cast (FielsNameas money(8)),1) as money ) as FieldName
which has to return data in the format like this:.0000
.0000
44.0000
39.0000
.0000
169.0000
.0000
.0000
85.0000
.0000
288.0000
.0000
.0000
.0000
36.0000
36.0000
36.0000
294.0000
What I have is Incorrect:
.0000
.0000
440.0000
390.0000
.0000
.1690.0000
.0000
.0000
850.0000
.0000
.2880.0000
.0000
.0000
.0000
360.0000
360.0000
360.0000
2940.0000
Please help to solv it.
Thank you|||Just curious, but what are you really trying to do? You've posted several questions, all of which "miss the mark" in some important way. I think if you back off just a bit from the technical details and focus on the business task at hand and explain that for us, then we can probably give you much better (both easier to implement/understand and more useful) answers.
-PatP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment