Blog  |  Contact Us

Search the Knowledgebase Browse by Category
Inner Joins Error
Last Updated
9th of February, 2012

Note: The following information only applies to TestTrack 2011.1.3 and earlier.

Problem

When using inner joins in an ASP page, VB Script, or JavaScript the following error occurs:

[Seapine Software][TestTrack ODBC Driver]Unexpected extra token: INNER

Cause

The TestTrack ODBC driver supports inner joins but it does require a particular syntax.

Solution

Following are examples of the syntax that the CodeBase ODBC driver is expecting:

ijshorthand ::= { IJ ij }

ij ::= tableref INNER JOIN tableref ON boolean
| tableref INNER JOIN ij ON Boolean

For a join on Table1 and Table2, you would have this, as expected:

select ... from { IJ table1 INNER JOIN table2 ON table1.field = table2.field}

To join Table3 to the join of Table1 and Table2, you would have something like this:

select ... from { IJ table3 INNER JOIN table1 INNER JOIN table2 ON table1.field = table2.field ON table3.field = table1.field }

Example

Following is an example of the Inner Join using CodeBase supported syntax in Scripting:

SELECT DEFECTS.DEFECTNUM
,DEFECTS.SUMMARY
,RELEASE.VERSION
FROM { IJ DEFECTS INNER JOIN RELEASE ON DEFECTS.IDRECORD = RELEASE.IDDEFREC}

 

Attachments
No attachments were found.
Related Articles

© 2012 Seapine Software, Inc., All rights reserved.