In List

Discussion in 'ASP .Net' started by Mat, Dec 8, 2006.

  1. Mat

    Mat Guest

    In SQL you can use the operator "IN" in a where clause.

    Is it possible to use the same in an vbscript IF statement?
     
    Mat, Dec 8, 2006
    #1
    1. Advertising

  2. On Fri, 8 Dec 2006 13:34:22 -0500, Mat wrote:

    > In SQL you can use the operator "IN" in a where clause.
    >
    > Is it possible to use the same in an vbscript IF statement?


    Yep.

    Like so:

    Select fullname, age from people where age in (50,60,70)
    --
    Bits.Bytes
    http://bytes.thinkersroom.com
     
    Rad [Visual C# MVP], Dec 8, 2006
    #2
    1. Advertising

  3. On Fri, 8 Dec 2006 13:34:22 -0500, Mat wrote:

    > In SQL you can use the operator "IN" in a where clause.
    >
    > Is it possible to use the same in an vbscript IF statement?


    Sorry, less haste, less waste!

    Not sure VBScript can do that...

    Closes thing would be to put what you want in an array or some such
    collection then process it in a foreach loop I'd think...
    --
    Bits.Bytes
    http://bytes.thinkersroom.com
     
    Rad [Visual C# MVP], Dec 8, 2006
    #3
  4. Mat

    Mat Guest

    select case can do it but this is not beautiful

    "Rad [Visual C# MVP]" <> wrote in message
    news:1x669alf46wuv$...
    > On Fri, 8 Dec 2006 13:34:22 -0500, Mat wrote:
    >
    >> In SQL you can use the operator "IN" in a where clause.
    >>
    >> Is it possible to use the same in an vbscript IF statement?

    >
    > Sorry, less haste, less waste!
    >
    > Not sure VBScript can do that...
    >
    > Closes thing would be to put what you want in an array or some such
    > collection then process it in a foreach loop I'd think...
    > --
    > Bits.Bytes
    > http://bytes.thinkersroom.com
     
    Mat, Dec 9, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. roopa
    Replies:
    6
    Views:
    763
    Jerry Coffin
    Aug 27, 2004
  2. dackz
    Replies:
    0
    Views:
    497
    dackz
    Feb 6, 2007
  3. Debajit Adhikary
    Replies:
    17
    Views:
    698
    Debajit Adhikary
    Oct 18, 2007
  4. OW Ghim Siong
    Replies:
    2
    Views:
    405
    Peter Otten
    Nov 30, 2010
  5. asil klin
    Replies:
    28
    Views:
    1,312
    Andreas Leitgeb
    Mar 5, 2011
Loading...

Share This Page