Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Posts
    20

    Unanswered: Help with sql query

    I got a access table (root table) in my testDB below, I need help on this.
    A query that uses if statement (if User=name1 then ….else….QnameU = U(or 0)) and places the results like the destination table below sorted by date. I am stuck on this!!
    Thanks!
    Andrew
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Re: Help with sql query

    Originally posted by alazarou
    I got a access table (root table) in my testDB below, I need help on this.
    A query that uses if statement (if User=name1 then ….else….QnameU = U(or 0)) and places the results like the destination table below sorted by date. I am stuck on this!!
    Thanks!
    Andrew
    Sorry Andrew, couldn't open it. Extract yes. Open No.

    Gregg

  3. #3
    Join Date
    Aug 2003
    Posts
    106
    I generally place the IF..ELSE.. statements in the code itself.

    It means writing two seperate SQL statements but only the chosen one will run.

    For example:

    If User = "Dan" Then
    strsql = "SELECT ..."
    Else: strsql = "SELECT..."
    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
  •