Multiple tables

Results 1 to 3 of 3

Thread: Multiple tables

  1. #1
    JohnH Guest

    Default Multiple tables

    Is it possible to select from multiple tables of the same access database? I have tried to concatenate two select statements - but cannot get any results other than syntax and missing operator errors.<BR><BR>strQuery = "Select * FROM Table1 "<BR>strQuery = strQuery & "WHERE Table2=&#039" & Variable2 <BR>strQuery = strQuery & " ORDER BY variable2, "<BR>strQuery = strQuery & "Select * FROM Table2"

  2. #2
    Join Date
    Dec 1969

    Default RE: Multiple tables

    "Select a.* FROM Table1 a, Table2 b"<BR>strQuery = strQuery & "WHERE a.fieldx=b.fieldy"<BR>strQuery = strQuery &"b.field=" & Variable2 <BR>strQuery = strQuery & " ORDER BY field"<BR><BR><BR>fieldx and fieldy are primary and foreign key relationships<BR>

  3. #3
    Delirium Guest

    Default RE: Multiple tables

    Dont know if the following works in Access but does in SQL and Oracle so I am sure it would with Access.<BR><BR>Select a.*,,b.age from Timesheet a, EmployeeDetails b where a.ID=2 and b.ID=2<BR><BR>Hope this helps.<BR><BR>D.

Posting Permissions

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