how can I accomplish:
select * from table where column_value is int
I know I can probably inner join to the system tables and type tables b
I would do a UDF as Svetlozar Angelov suggests, but I would check for ISNUMERIC first (and return 0 if not), and then check for column_value % 1 = 0
to see if it's an integer.
Here's what the body might look like. You have to put the modulo logic in a separate branch because it will throw an exception if the value isn't numeric.
DECLARE @RV BIT
IF ISNUMERIC(@value) BEGIN
IF CAST(@value AS NUMERIC) % 1 = 0 SET @RV = 1
ELSE SET @RV = 0
END
ELSE SET @RV = 0
RETURN @RV