User Tools

Site Tools


prop_sqljoinexpression.htm
Navigation:  SQL Driver Properties(General) >====== PROP:SQLJoinExpression ====== Previous pageReturn to chapter overviewNext page

You can use PROP:SQLJoinExpression to structure your VIEWs using native SQL code rather than Clarion code.

NoteBox.jpg

Using PROP:SQLJoinExpression may slow down performance in some circumstances.

When you use PROP:SQLJoinExpression, the SQL join expression is passed directly to the server. As such it cannot contain the name of variables or functions that the server is not aware of; the join expression must be valid SQL syntax with valid SQL column names.

For example:

View{PROP:SQLJoinExpression} = 'TO_DATE - FROM_DATE'

Combining VIEW Orders and SQL Orders

When you use PROP:SQLJoinExpression, the SQL join expression may replace any join specified for the VIEW, or it may be in addition to the join specified for the VIEW. Prefix the SQL join with a plus sign (+) to concatenate the SQL join expression to the existing VIEW join expression.

For example:

View{PROP:SQLOrder} = '+ TO_DATE - FROM_DATE'

When you concatenate the SQL join by using the plus sign, the result set contains (first) the Clarion joined values, then the SQL joined values.

Omit the plus sign (+) to replace the Clarion join expression with the SQL join expression.

TipBox.jpg

PROP:SQLJoinExpression only affects the JOIN portions of the VIEW declaration; it does not affect the PROJECT portions.

See Also: JOIN (Declare a join operation)

prop_sqljoinexpression.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1