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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete sql with WHERE ... IN .... 1

Status
Not open for further replies.

hamking01

Programmer
May 30, 2004
238
US
I have a dropdownlist with list of names and am trying to allow users to select multiple items and submit form. OnClick, it will delete the selected items from the database. I've tried deleting using the 'WHERE ABC IN (1,2,3)' in the stored procedure. But ABC column is integer and I can only pass 1,2,3 as string and is causing an error. Any advice on how to get around this? Thanks. I'm also posting this in the ASP.net forum.
 
try this...
Code:
myvalue=replace(request.form("mydropdown"),","','")
WHERE ABC IN ('"&myvalue&"')

-DNG
 
oops...i guess i ignored the integer part...can you show us your stored procedure...

-DNG
 
Passing a list of values to a Stored Procedure faq183-3979
Passing a list of values to a Stored Procedure (Part II) faq183-5207
Do these help?

Questions about posting. See faq183-874
Click here to help with Hurricane Relief
 
SQLSister

Haven't tried it yet, only took a brief look, but it looks like this is exactly what I'm looking for. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top