Hello,
I am trying to build a VB ADO recordset off of several outer joins in an Access DB, the syntax for the SQL I am using is:
SELECT table1.field2, table2.field2, table3.field2
FROM table1 LEFT OUTER JOIN table2
ON table1.field1 = table2.field1
LEFT OUTER JOIN table3
ON table1.field1 = table3.field1
WHERE (table1.field3 = 1)
I can get the SELECT to work with one outer join, but as soon as I add another one I get a syntax error. Table1 is populated with fields that I want to grab, table2 and table3 both have a relationship to table1.field1. Table1 always has data but only table2 or table3 will have data for the corresponding key, field1.
I've tried several different variations with no luck...anyone out there know my mistake with the syntax? I am new to SQL and VB so I won't be insulted if you tell me I am doing something silly.
Thanks for your help.
I am trying to build a VB ADO recordset off of several outer joins in an Access DB, the syntax for the SQL I am using is:
SELECT table1.field2, table2.field2, table3.field2
FROM table1 LEFT OUTER JOIN table2
ON table1.field1 = table2.field1
LEFT OUTER JOIN table3
ON table1.field1 = table3.field1
WHERE (table1.field3 = 1)
I can get the SELECT to work with one outer join, but as soon as I add another one I get a syntax error. Table1 is populated with fields that I want to grab, table2 and table3 both have a relationship to table1.field1. Table1 always has data but only table2 or table3 will have data for the corresponding key, field1.
I've tried several different variations with no luck...anyone out there know my mistake with the syntax? I am new to SQL and VB so I won't be insulted if you tell me I am doing something silly.
Thanks for your help.