Answered
tsql stored procedure - passing multiple variables
Hi,
I have a dropdown field on a form that allows for multiple selects. When I process the form, I currently use CF to dynamically generate the sql WHERE clause creating as many AND statements as needed.
I'm migrating to MS SQL 2005 and Stored Procedures on the db. I'm trying to create a stored procedure that effectively uses tsql to do what CF was doing previously (creating the WHERE clause).
In the code below, I am passing a char(22) variable called Channel. The code below was my initial attempt at trying to create the WHERE clause. Most of the code is focused on extracting out the individual "Channel" entities. Any thoughts on how to pull this together would be GREATLY appreciated!
I'm need help on the SELECT side, ultimately I'm selecting "regions", from "Syndicated", the WHERE is based on the "Channels" passed.
Thanks,
cfwild
I have a dropdown field on a form that allows for multiple selects. When I process the form, I currently use CF to dynamically generate the sql WHERE clause creating as many AND statements as needed.
I'm migrating to MS SQL 2005 and Stored Procedures on the db. I'm trying to create a stored procedure that effectively uses tsql to do what CF was doing previously (creating the WHERE clause).
In the code below, I am passing a char(22) variable called Channel. The code below was my initial attempt at trying to create the WHERE clause. Most of the code is focused on extracting out the individual "Channel" entities. Any thoughts on how to pull this together would be GREATLY appreciated!
I'm need help on the SELECT side, ultimately I'm selecting "regions", from "Syndicated", the WHERE is based on the "Channels" passed.
Thanks,
cfwild
