July 27, 2013 at 5:40 am
when i try to execute the below query it throws an error "Conversion failed when converting the varchar value '1131-' to
data type int."
SELECT dbo.fn_int_only('11AB31-A')
but SELECT dbo.fn_int_only('11AB31') this query returns a proper result like 1131
is there any other ways to filter only INT values? or how do i overcome this error?
July 27, 2013 at 10:26 am
deepthipayal01 (7/27/2013)
when i try to execute the below query it throws an error "Conversion failed when converting the varchar value '1131-' todata type int."
SELECT dbo.fn_int_only('11AB31-A')
but SELECT dbo.fn_int_only('11AB31') this query returns a proper result like 1131
is there any other ways to filter only INT values? or how do i overcome this error?
Step 1 would be to post the code for the user defined function that you're using.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply