pgooseman
asked on
SQL Query - Join or Subquery
Two tables, one called tblOffice the other called tblFactory.
Both tables have the following fields. FirstName, LastName, Birthday
I need to combine (join) both tables where the Birthday = today's date.
DIM vDate
vDate = Date()
vSQL = ""
vSQL = vSQL & " SELECT o.FirstName, o.LastName, 0.Birthday, f.FirstName, f.LastName, f.Birthday "
vSQL = vSQL & " FROM tblOffice o "
vSQL = vSQL & " CROSS JOIN tblFactory f "
vSQL = vSQL & " WHERE o.Birthday = '" & vDate & "' OR f.Birthday = '" & vDate & "' "
Cross join does not appear to be producing the correct results.
Both tables have the following fields. FirstName, LastName, Birthday
I need to combine (join) both tables where the Birthday = today's date.
DIM vDate
vDate = Date()
vSQL = ""
vSQL = vSQL & " SELECT o.FirstName, o.LastName, 0.Birthday, f.FirstName, f.LastName, f.Birthday "
vSQL = vSQL & " FROM tblOffice o "
vSQL = vSQL & " CROSS JOIN tblFactory f "
vSQL = vSQL & " WHERE o.Birthday = '" & vDate & "' OR f.Birthday = '" & vDate & "' "
Cross join does not appear to be producing the correct results.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.