Need help with SQL for multiple select ???

Results 1 to 2 of 2

Thread: Need help with SQL for multiple select ???

  1. #1
    Join Date
    Dec 1969

    Default Need help with SQL for multiple select ???

    Hi,<BR>I need to insert all the rows based on the selectbox(stored as prc_split(i)) in a text file.<BR>I&#039;m using the below "for" loop to do that.<BR>I&#039;m having 2 problems:<BR>1) what do I need to use instead of n???<BR>2) Even though I&#039;m using prc_split(i), the debug sql is displaying onlt the first selected value in the selectbox?<BR>Here is my code:<BR><BR><BR>for i=0 to n<BR> sql = "Select Sys,Process from TC where process=&#039;"&prc_split(i)&"&#039; "<BR> rs6.Open sql,conn<BR> Response.Write "DEBUG: SQL is " & sql & "&#060;HR&#062;" <BR>next<BR><BR>I need to know:<BR>1) What should I be using instead of &#039;n&#039;?<BR>2) How can I gather all the rows based on all selected values in the selectbox indicated by prc_split(i)??<BR>Please let me know if you need any other information?<BR><BR>Thanks,<BR>

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Databases, Queries

    The link to the ASPFAQs is at the top right corner of this very page.<BR><BR>Look in the category noted above for your question.<BR><BR>The ASPFAQs are you friends. You should visit your friends often.<BR><BR>****************<BR><BR>All I can say is "UGH". The idea that you would do one query per array element instead of just one query, period...well, ugh.<BR><BR>ONE QUERY. ONLY. Okay?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts