Reputation: 244
For example, I have the following result set:
11.2300,
23.4560,
10.4100,
12.5677,
Can someone please write me how to make a filter in MSSQL that will show me only these results:
23.4560,
12.5677
I want to find all the results where the last two digits are not 00.
Thanks!
Upvotes: 1
Views: 38
Reputation: 175756
Using %
(remainder/modulo division):
CREATE TABLE #tab(col DECIMAL(10,4));
INSERT INTO #tab(col)
VALUES (11.2300),(23.4560),(10.4100),(12.5677);
SELECT col
FROM #tab
WHERE col % 0.01 <> 0;
Upvotes: 2