Within the MS Access environment, it is possible to perform joins of various types (inner, left outer, right outer). From LabVIEW, entering a SELECT statement that performs an inner join results in the error message: Execute SQL: Unexpected end of text at SQL query: 'JOIN'. The SELECT statement is:
SELECT*
FROM TableA INNER JOIN TableB on TableA.Col2A = TableB.Col2B;
Valid join types from LabVIEW are LEFT JOIN and LEFT OUTER JOIN, but not RIGHT JOIN.
I produced this error SQL 1.1.4 and Access 7.0 driver and SQL2.0 with Access 97 driver.
Instead of using SQL of the form:
SELECT*
FROM TableA INNER JOIN TableB on TableA.Col2A = TableB.Col2B;
use the following:
PROCEDURE test; SELECT*
FROM TableA INNER JOIN TableB on TableA.Col2A = TableB.Col2B;
The
Access help file describes the "Procedure" statement, but they give almost no information on it other than you specify a procedure name and a single statement.
An alternative is to not use an inner join but to do it yourself. That is, rather than selecting * from the joined results, specify the actual columns that you want from each table and the conditions (e.g.: select tablea.col1a, tablea.col2a, tableb.col1b from tableA, tableB where tablea.col2a = tableb.col2b;)
J.R. Allen