crosspost..sorry...need help

Results 1 to 3 of 3

Thread: crosspost..sorry...need help

  1. #1
    Join Date
    Dec 1969

    Default crosspost..sorry...need help

    Sorry for the crosspost but I thought perhaps this would be better placed here.<BR><BR>I have a db that has 2 tables case1 and case2. I want to display the contents of those tables dependent on the Users e-mail address and their password. In some instances the user will have records in both tables and in some cases in only the first table or both. Using the code below I am trying to accomplish that. What I am getting is this..if the user has a record in BOTH tables the info displays fine. However if the have a record in the the first table only I get my EOF message that there are no records found. <BR><BR><BR>sql = "SELECT case1.setno,case1.set_1,case1.entered, case2.intno, case2.setno FROM case1, case2" _ <BR>& "WHERE case1.Password =&#039;" & Password & "&#039; AND case1.Email =&#039;" & Email & "&#039;" _ <BR>& "ORDER BY case1.setno" <BR><BR>Someone told me to try a left join for this so I changed the select to:<BR><BR>sql = "SELECT FROM case1 LEFT JOIN case2 ON case1.setno = case2.setno " <BR><BR>Unfortunately I get this error <BR><BR>Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect. <BR><BR>I don&#039;t think any of those is a reserved word and the names are not spelled incorrectly. So I guess that would leave punctuation? <BR><BR>Is a left join the answer and if so can someone help me with the correct syntax?

  2. #2
    <eop> Guest

    Default Wrong Forum


  3. #3
    Kasper Guest

    Default RE: crosspost..sorry...need help

    If you are really stumped, generate the query in access, switch to sql mode and copy&paste to your asp page.

Posting Permissions

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