Results 1 to 2 of 2

Thread: sql query :)

  1. #1
    Join Date
    May 2002
    Posts
    37

    Unanswered: sql query :)

    Is it possible to combine an if statement with sql...example:

    if x=y then
    SELECT *
    FROM tbl_comp
    else
    SELECT *
    FROM tbl_comp
    Where x<>y

  2. #2
    Join Date
    May 2002
    Posts
    3
    dim sqlString as string

    sqlString = "SELECT * from tbl_comp "

    if x <> y then
    sqlString = sqlString & " WHERE ..."
    end if

Posting Permissions

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