on 10-07-2009 7:10 PM
Cr 2008, SQL Server 08
I have a string field that holds values like 1.0, 2.5, 5.0.
What I need to do is if the decimal is a 0 then only display the whole number and strip of the .0, if it is like 2.5 then display 2.5.
I have not figured out how to do this.
thanks,
GJ
if split({stringfield},'.')[2] = '0' then split({stringfield},'.')[1] else {stringfield};
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.