Can I use FOR XML PATH in sql for int columns ? So that I could use it for something like:
declare @contactIds = (select id from contacts)
and then use it like this:
select * from calls where contactId in (@contactIds)
Is it possible ?
Can I use FOR XML PATH in sql for int columns ? So that I could use it for something like:
declare @contactIds = (select id from contacts)
and then use it like this:
select * from calls where contactId in (@contactIds)
Is it possible ?
Is this what you want?
You can also use a subquery directly or a table variable:
My guess is that your problem is more complex than the question, so this doesn't really solve the problem.