Explorer_Set_SQL_Join_Info

Examples


The Explorer_Set_SQL_Join_Info procedure is used to define the relationships between SQL tables for SQL-optimized SmartList objects. When adding additional columns to existing SmartList objects, you will use this procedure to define how the tables for the new columns are related to the main table used for the SmartList object.

Syntax

Explorer_Set_SQL_Join_Info, From_Table, From_Table_Dict_ID, From_Field, To_Table, To_Table_Dict_ID, To_Field, Join_Type, Error

Parameters

From_Table – A string specifying the technical name of the primary table to join from.

From_Table_Dict_ID – An integer specifying the ID of the dictionary containing the primary table to join from.

From_Field – A string up to 80 characters long specifying the technical name of the field from the primary table to join from.

To_Table – A string specifying the technical name of the secondary table to join to.

To_Table_Dict_ID – An integer specifying the ID of the dictionary containing the secondary table to join to.

To_Field – A string up to 80 characters long specifying the technical name of the field in the secondary table to join to.

Join_Type – An integer specifying the type of join being created. Use one of the following constants:

[spacer]

Constant

Value

Comments

SMARTLIST_JOINTYPE_NONE

0

Use when no join is needed.

SMARTLIST_JOINTYPE_REGULAR

1

 

SMARTLIST_JOINTYPE_RIGHTOUTER

2

 

SMARTLIST_JOINTYPE_LEFTOUTER

3

Virtually all joins needed for SmartList objects are this type.

SMARTLIST_JOINTYPE_CROSS

4

 

SMARTLIST_JOINTYPE_INNER

5

 

SMARTLIST_JOINTYPE_FULL

6

 

SMARTLIST_JOINTYPE_DISTINCT

7

 


Error – A returned integer containing any database errors that occurred while adding the join information.

Comments

This procedure is typically called from the Explorer_Get_SQL_Join_Info procedure you will add to your integrating application.

When multiple fields are needed to create the join (such as for a multi-segment key) you will call this procedure once for each individual field in the join.


Documentation Feedback