SELECT * FROM (SELECT '1.34' AS num )tabwhere charindex('.',REVERSE(cast(tab.num as varchar(50))))-1>2