January 19, 2017 at 11:44 am
This is the first line in my query...
select '1002.' + b.dept_20K + '.90003' as 'roc',
but I get an error "Msg 245, Level 16, State 1, Line 1Conversion failed when converting the varchar value '1002.' to data type int."
I tried a few different ways to convert to varchar but, still getting the error. Any thoughts?
January 19, 2017 at 11:49 am
NineIron - Thursday, January 19, 2017 11:44 AMThis is the first line in my query...
select '1002.' + b.dept_20K + '.90003' as 'roc',but I get an error "Msg 245, Level 16, State 1, Line 1Conversion failed when converting the varchar value '1002.' to data type int."
I tried a few different ways to convert to varchar but, still getting the error. Any thoughts?
Use the convert function to typecast b.dept_20K to a character string.
😎
January 19, 2017 at 11:52 am
Eirikur Eiriksson - Thursday, January 19, 2017 11:49 AMNineIron - Thursday, January 19, 2017 11:44 AMThis is the first line in my query...
select '1002.' + b.dept_20K + '.90003' as 'roc',but I get an error "Msg 245, Level 16, State 1, Line 1Conversion failed when converting the varchar value '1002.' to data type int."
I tried a few different ways to convert to varchar but, still getting the error. Any thoughts?Use the convert function to typecast b.dept_20K to a character string.
😎
Thanx. I was trying to convert the '1002.'. Rookie mistake!
January 19, 2017 at 10:12 pm
This was removed by the editor as SPAM
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply