Hi.
I have a table with numeric and non numeric:
I'm trying to find all values between 10 and 15 and getting an error:
I'm getting an error: Msg 245, Level 16, State 1, Line 16
Conversion failed when converting the varchar value 'T' to data type int.
Is there a way I can find only the values between 10 and 15:
10
11
Thanks!
I have a table with numeric and non numeric:
Code:
declare @temp table (Data varchar(20))
insert into @temp values (NULL)
insert into @temp values ('10')
insert into @temp values ('T')
insert into @temp values ('11')
insert into @temp values ('5')
insert into @temp values ('P')
I'm trying to find all values between 10 and 15 and getting an error:
Code:
select * from @temp
where Data is not null
and ISNUMERIC(Data + 'e0')=1
and convert(int, data) between 10 and 15
I'm getting an error: Msg 245, Level 16, State 1, Line 16
Conversion failed when converting the varchar value 'T' to data type int.
Is there a way I can find only the values between 10 and 15:
10
11
Thanks!