Results 1 to 2 of 2

Thread: SQL - selecting multiple values

  1. #1
    Raghavendra Guest

    SQL - selecting multiple values


    How to select multiple values in the same column using SQL? I tried with the following code but didnt work. Do you have any idea!

    sql = "SELECT * FROM ppel WHERE country LIKE 'India'"
    for q = 1 to count
    sql = sql & "AND rfr LIKE '"&trim(z(q))&"'"
    end if
    next

    Raghu

  2. #2
    uncle big Guest

    SQL - selecting multiple values (reply)

    one of the things i would do is use a wildcard character on either side of the like condition (ie LIKE 'India%&#39 that may help...



    ------------
    Raghavendra at 4/2/01 5:25:51 AM


    How to select multiple values in the same column using SQL? I tried with the following code but didnt work. Do you have any idea!

    sql = "SELECT * FROM ppel WHERE country LIKE 'India'"
    for q = 1 to count
    sql = sql & "AND rfr LIKE '"&trim(z(q))&"'"
    end if
    next

    Raghu

Posting Permissions

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