Ansicht
Dokumentation

ABENWHERE_LOGEXP_LIST_IN - WHERE LOGEXP LIST IN

ABENWHERE_LOGEXP_LIST_IN - WHERE LOGEXP LIST IN

BAL_S_LOG - Application Log: Log header data   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Short Reference

- ( operand1, operand2, ... ) IN ( ... )

... ( operand1, operand2$[, ...$] ) IN ${ ( ( operand11, operand21$[, ...$] )$[,
                                         ( operand12, operand22$[, ...$] )$] ) $}
                                   $| ${ ( SELECT subquery_clauses $[UNION$|INTERSECT$|EXCEPT ...$] ) $} ...


Variants:

1. ... ( operand1, operand2$[, ...$] ) IN ( ( operand11, operand21$[, ...$] )$[, ...$] ) )

2. ... ( operand1, operand2$[, ...$] ) IN ( SELECT subquery_clauses [UNION$|INTERSECT$|EXCEPT ...] )

Effect

Checks whether the values of the operands operand1, operand2, ... specified on the left side as a parenthesized comma-separated list match a value tuple from a set of value tuples specified in parentheses. The set of value tuples can be specified as follows:

  • Using a comma-separated list of parenthesized tuples ( operand11, operand21[, ...] ), ( operand12, operand22[, ...] ), ...

The following applies to operand1, operand2, ...:

At least one blank must be placed after every opening parenthesis and in front of every closing parenthesis. The comma-separated list operand1, operand2, ... must contain at least two elements.

Note

The operator NOT is not currently supported.

Variant 1

... ( operand1, operand2$[, ...$] ) IN ( ( operand11, operand21$[, ...$] )$[, ...$] ) )


Effect

This relational expression is true if the value of every operand operand1, operand2, ... on the left side matches the content of the operand of a parenthesized value tuple ( operand11, operand21[, ...] ) in the same place on the right side. Every value tuple must contain the same number of elements as the comma-separated list operand1, operand2, ... on the left side. The value tuples themselves are specified as a parenthesized comma-separated list, which can also consist of only one element.

operand11, operand21, ... of a value tuple can be any SQL expressions except window expressions. Aggregate expressions are currently only possible in a HAVING clause. Literals, host variables, and host expressions are handled like elementary SQL expressions, which means they are mapped to dictionary types instead of being converted.

Notes

  • This variant of IN can also be expressed using individual comparisons combined using AND and OR and the comparison operator =, but SQL expressions are not possible on the right side. This is also how this variant of IN is distinguished from the variant with a single operand.
  • When used, this variant of IN, applies the strict mode from Release .

Example

The query finds all rows in which the values of the three columns on the left side match one of the two value tuples on the right side.

Variant 2

... ( operand1, operand2$[, ...$] ) IN ( SELECT subquery_clauses [UNION$|INTERSECT$|EXCEPT ...] )


Effect

This relational expression is true if the value of every operand operand1, operand2, ... on the left side matches the content of the result set of the subquery. The result set of the subquery must contain the same number of elements in the same position as in the comma-separated list operand1, operand2, ... on the left side. The language elements UNION, INTERSECT, and EXCEPT can be used to combine the result sets of multiple subqueries. In this case, the rules for query_clauses apply.

Note

When used, this variant of IN applies the strict mode from Release .

Example

Reads the country of origin and the country of destination from the DDIC database table SPFLI for all flights which cost more than USD 100.The condition 'price > 100' is checked in a subquery that reads from the DDIC database table SFLIGHT.






Fill RESBD Structure from EBP Component Structure   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 7025 Date: 20240419 Time: 235008     sap01-206 ( 115 ms )