Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
micnie_2020
Posting Yak Master
232 Posts |
Posted - 2012-03-30 : 07:52:41
|
Dear All,I have below OVal Field, Type = Varchar. It's contain string of array int[]. eg: 1231,1241 I want it to be pass into AID, field type=int.But i getting error Conversion failed when converting the varchar value '1396,1395' to data type int.Please Advise.Thank you.select STUFF( ( SELECT ',' + cast(ANo as varchar) from tblM where AID in ( select replace(cast(OVal as int),',',''',''') from tblB where ATID=1723) FOR XML PATH('') ), 1, 1, '' ) |
|
X002548
Not Just a Number
15586 Posts |
|
micnie_2020
Posting Yak Master
232 Posts |
Posted - 2012-03-30 : 11:06:06
|
I found solution. Thank you for reply.Here is the link:-http://www.codeproject.com/Articles/30681/Split-parameter-string-from-comma-seperator-in-SQL |
 |
|
|
|
|
|
|