Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I pass variables to select statement 1

Status
Not open for further replies.

crasho2001

Technical User
Jun 13, 2002
51
TR
I have following statement in my stored procedure. From first two rows I can see the values for variables.

"where ce = @ce" is also working. But " (id not like "{@bc,%" or id not like "{%,@bc,%" or id not like "%,@bc}") " is not working.



How can I pass @bc to " (id not like "{@bc,%" or id not like "{%,@bc,%" or id not like "%,@bc}") " .....



select @ce

select @bc

select bs,ce,bc,id from int where ce = @ce

having(id not like "{@bc,%" or id not like "{%,@bc,%" or id not like "%,@bc}")
 
String 'em together with +
eg
and not like @bc + "%" and not like "%" + @bc


HTH

Dickie Bird (:)-)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top