How can I iterate through the values returned from the following statement?

SQL = "SELECT userID, myUsers, one, two FROM users WHERE userID IN (1,2) "


Thanks

Re: using WHERE IN in SQL by Ray

Ray
Wed Nov 19 22:52:32 CST 2003

Put them in a recordset and do

<%
Do while not TheRecordset.EOF
Response.Write "The UserID value is " &
TheRecordset.Fields.Item(0).Value
Response.Write "The myUsers value is " &
TheRecordset.Fields.Item(1).Value
Response.Write "The one value is " & TheRecordset.Fields.Item(2).Value
Response.Write "The two value is " & TheRecordset.Fields.Item(3).Value
Response.Write "<br>Okay, on to the next recordset, if there is
one.<hr>"
TheRecordset.MoveNext
Loop
%>

That's one option, anyway.

Ray at home

"Wilk Teverbaugh" <email@notanaddress.com> wrote in message
news:e7bk%230xrDHA.2004@TK2MSFTNGP10.phx.gbl...
> How can I iterate through the values returned from the following
statement?
>
> SQL = "SELECT userID, myUsers, one, two FROM users WHERE userID IN (1,2) "
>
>
> Thanks
>
>



Re: using WHERE IN in SQL by Wilk

Wilk
Thu Nov 20 00:51:37 CST 2003

Thanks Ray.
Very helpful.



"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
news:uvnbQGyrDHA.2028@TK2MSFTNGP10.phx.gbl...
> Put them in a recordset and do
>
> <%
> Do while not TheRecordset.EOF
> Response.Write "The UserID value is " &
> TheRecordset.Fields.Item(0).Value
> Response.Write "The myUsers value is " &
> TheRecordset.Fields.Item(1).Value
> Response.Write "The one value is " & TheRecordset.Fields.Item(2).Value
> Response.Write "The two value is " & TheRecordset.Fields.Item(3).Value
> Response.Write "<br>Okay, on to the next recordset, if there is
> one.<hr>"
> TheRecordset.MoveNext
> Loop
> %>
>
> That's one option, anyway.
>
> Ray at home
>
> "Wilk Teverbaugh" <email@notanaddress.com> wrote in message
> news:e7bk%230xrDHA.2004@TK2MSFTNGP10.phx.gbl...
> > How can I iterate through the values returned from the following
> statement?
> >
> > SQL = "SELECT userID, myUsers, one, two FROM users WHERE userID IN (1,2)
"
> >
> >
> > Thanks
> >
> >
>
>