Processing parameters in TransAct SQL - TechRepublic
General discussion
December 11, 2001 at 10:15 AM
dmitryzb.

Processing parameters in TransAct SQL

by dmitryzb. . Updated 24 years, 5 months ago

Here’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

This discussion is locked

All Comments