General discussion
-
Topic
-
Processing parameters in TransAct SQL
LockedHere’s my problem:
select *
from #my_vars
where sec_type in (select @new_type)Variable @new_type contains different values (Ex. string1, string2, or “string1″,”string2″) to match one or the other or both. When the var contains string1 or string2, it works. When it contains the combo (this is how I assign the value)
select @new_type = ‘”string1”,”string2″‘
it doesn’t work.
If I hard code the combo in the where clause, like this:
where sec_type in (“string1″,”string2”)
it works.
Maybe it’s the version of Sybase that I’m running?..
Thank you,
– Dmitry