Re: Convert float to char
- From: jaijai_kumar@xxxxxxxxxxx
- Date: 30 Aug 2005 11:37:04 -0700
Hello all,
Thanks a lot for all your messages.
Erland your work around gave me a good hint.
I have created a small function to do the same.
Jai
jaijai_kumar@xxxxxxxxxxx wrote:
> Select Cast('100.1234' as float)
> give me the result 100.1234
> Now when I convert it back to char I want exactly 100.1234
> Select Convert(char(100),Cast('100.1234' as float))
> Gives me 100.123 (Here I was expecting 100.1234)
>
> When I do
> Select STR(Cast('100.1234' as float),25,4)
> I get back the result as 100.1234
>
> However here I am not sure how many digits do I have after the decimal
> point. If I put some value like
> Select STR(Cast('100.1234' as float),25,8)
> I get 0's appended to it, which is again not desired.
>
>
>
> Thanks in advance,
> Jai
.
- References:
- Convert float to char
- From: jaijai_kumar
- Convert float to char
- Prev by Date: Re: Rewrite a WHERE clause
- Next by Date: Re: SQl server processors and threads
- Previous by thread: Re: Convert float to char
- Next by thread: Searching multiple entities at a time
- Index(es):