JavaScript Editor js editor     Web development 

Main Page

You can use the SQLEXEC(В ) function to execute ODBC extensions to SQL by enclosing the SQL statement with SQL Access Group standard or extended escape syntax. For more information about ODBC extensions to SQL, refer to the SQL Grammar appendix in your ODBC documentation.

Creating Outer Joins Using the ODBC Escape Clause

You can use SQL pass-through to perform outer joins on remote data using the ODBC escape syntax, if your server supports outer joins. An outer join combines information from one or more tables regardless of whether matching rows are found.

The syntax for outer joins using the ODBC escape clause is:

В Copy Code
{oj outer-join expression}

The following example creates a result set of the names and departments of employees working on project 544:

В Copy Code
SELECT, dept.deptname;
   FROM {oj employee LEFT OUTER JOIN dept;
            ON employee.deptid = dept.deptid};
   WHERE employee.projid = 544

For more information on outer join syntax and types of outer joins, see your server documentation. For information on creating a named connection, see How to: Define Connections to Remote Data Sources.

See Also

JavaScript Editor js editor     Web development