Ansicht
Dokumentation

ABENWHERE_LOGEXP - WHERE LOGEXP

ABENWHERE_LOGEXP - WHERE LOGEXP

General Data in Customer Master   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

sql_cond - rel_exp for Statements

Short Reference



Syntax

... ${ ${operand1 ${=$|EQ$|<>$|NE$|>$|GT$|<$|LT$|>=$|GE$|<=$|LE$}
                  ${  operand2
                  $| ${ $[ALL$|ANY$|SOME$] ( SELECT subquery_clauses $[UNION ...$] )$} $}$}
    $| ${operand $[NOT$] BETWEEN operand1 AND operand2$}
    $| ${operand1 $[NOT$] LIKE operand2 $[ESCAPE esc$]$}
    $| ${operand $[NOT$] IN (operand1, operand2 ...)$}
    $| ${operand $[NOT$] IN @seltab$}
    $| ${operand IS $[NOT$] NULL$}
    $| ${operand IS $[NOT$] INITIAL$}
    $| ${(cond_syntax)$}
    $| ${EXISTS ( SELECT subquery_clauses $[UNION ...$] )$}
    $| ${operand $[NOT$] IN ( SELECT subquery_clauses $[UNION ...$] )$} $} ...

Effect

Relational expression in a condition of an statement. Logical expressions sql_cond can be formed from the relational expressions shown here for the following conditions:

  • Read accesses

  • Modifying accesses

The possible operands of a relational expression are columns and SQL expressions, which covers literals, host variables, and host expressions. The category of the expression and where it is used determine which operands can be used and where. The following principles apply:

  • No SQL expressions can be used on the right side of relational expression.
  • Columns or expressions of the type STRING, RAWSTRING, LCHR, or LRAW cannot be used.

A relational expression rel_exp is either true, false, or unknown. The expression is unknown if one of the columns involved in the database contains a null value and is evaluated with another comparison as IS NULL. The result of joins of relational expressions with unknown results is described under AND, OR, NOT.

In an SQL condition of a statement, the client column of a client-specific data source of a query or of the target of a write statement can be used as an operand only if automatic client handling is switched off using the addition CLIENT SPECIFIED for the query or write. This is checked in full in the strict modes of the syntax check from Release 7.40, SP05.

Notes

  • In comparisons between database columns or SQL expressions or aggregate expressions and database columns, it is essential that only operands of the same type and same length are used. This avoids platform-dependent conversion from taking place.
  • If expressions other than the SQL expressions that can be evaluated in the table buffer are used on the left side of a relational expression.

  • If items other than host variables or host expressions are specified on the right side of a relational expression used to identify a single record or a generically buffered area.

In other conditions not used for identifications, columns too can be specified in comparisons or when BETWEEN is used. This applies in cases where neither (numeric) operand has the type DF16_DEC or DF34_DEC, both operands are character-like, or both operands have the type RAW with the same length.
  • When SQL expressions are specified on the left side of a relational expression or host expressions occur on the right side, the syntax check is performed in a strict mode, which handles the statement more strictly than the regular syntax check.
  • Host variables without the escape character @ are obsolete. The escape character @ must be specified in the strict modes of the syntax check from Release 7.40, SP05.
  • If dynamic conditions, alternative table names, or joins are used, a client column can be accessed outside the strict modes of the syntax check in WHERE conditions and ON conditions, without automatic client handling being switched off using CLIENT SPECIFIED. In this case, there are two conditions for the client column: the implicit condition of the automatic client handler for the current client and the explicitly specified condition. If the current client is not specified in the explicitly specified condition, no rows are selected.






Fill RESBD Structure from EBP Component Structure   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 10149 Date: 20240328 Time: 235508     sap01-206 ( 111 ms )