Friday, March 9, 2012

Query decimal points value in T-sql

I have one field with data type float contains data e.g 245.5,65,36.2..etc.
I
need to query out all the value with decimal points only, means those value
=
245.5,36.2..
How can I use transact sql to check?
ThanksOne way might be:
SELECT Col
FROM YourTable
WHERE (Col - CONVERT(INT, Col)) > 0
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"WS" <WS@.discussions.microsoft.com> wrote in message
news:49651063-1618-4DBD-975A-81DCD607E35F@.microsoft.com...
> I have one field with data type float contains data e.g
245.5,65,36.2..etc. I
> need to query out all the value with decimal points only, means those
value =
> 245.5,36.2..
> How can I use transact sql to check?
> Thanks

No comments:

Post a Comment