Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: QUery Problems

Results 1 to 2 of 2
Share This Thread →
  1. #1
    Jaykappy is offline Contributing User
    Join Date
    Feb 2005
    Posts
    1,278
    Rep Power
    36

    QUery Problems

    I am trying to query a dataset and having issues....Query 1 and Query 2 work below fine...
    But trying to combine them and Query 3 is failing/coming up with wrong number of records.

    Can anyone see anything wrong with it?
    Thanks

    Dim varRequestType1,varRequestType2, varStatus
    varRequestType1 = "Web Requestor"
    varRequestType2 = "Your Request"
    varStatus = "Planned"
    Dim myConn, Recordset,SQLQuery

    QUERY 1
    SQLQuery = "SELECT * FROM wdWRMainGeneral WHERE Requestor = '" & varRequestType1 & "' AND Status = '" & varStatus & "' "

    QUERY 2
    SQLQuery = "SELECT * FROM wdWRMainGeneral WHERE Requestor = '" & varRequestType2 & "' AND Status = '" & varStatus & "' "

    QUERY 3
    SQLQuery = "SELECT * FROM wdWRMainGeneral WHERE Requestor = '" & varRequestType1 & "' OR Requestor = '" & varRequestType2 & "' AND Status = '" & varStatus & "' "

  2. #2
    Jaykappy is offline Contributing User
    Join Date
    Feb 2005
    Posts
    1,278
    Rep Power
    36
    Got it

    SQLQuery = "SELECT * FROM wdWRMainGeneral WHERE Requestor = '" & varRequestType1 & "' OR Requestor = '" & varRequestType2 & "' AND Status = '" & varStatus & "' "

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Query Problems
    By relaxedbreeze in forum Microsoft Access Help
    Replies: 3
    Last Post: February 20th, 2007, 05:03 AM
  2. Problems with a Query!!
    By balwani_prem in forum ASP Development
    Replies: 2
    Last Post: February 23rd, 2005, 05:11 PM
  3. Query Problems
    By Jimbo78 in forum ASP Development
    Replies: 15
    Last Post: May 19th, 2004, 01:43 AM
  4. Pls Help! Problems with Query
    By aleks in forum ASP Development
    Replies: 1
    Last Post: February 11th, 2003, 11:10 AM

ASP Free Advertisers and Affiliates