SAP Parameter rsdb/prefer_union_all - set if UNION ALL shall be used for FOR ALL ENTRIES

Parameter
rsdb/prefer_union_all

Short text
set if UNION ALL shall be used for FOR ALL ENTRI

Parameter description
This parameter is only intended for internal use and must not be changedwithout explicit instruction from SAP.
An internal table [itab] with entry data is always returned to an ABAPSELECT query with the addition FOR ALL ENTRIES. Depending on whetherthis parameter is set to "0" or "1", a link to whole statements withUNION or an OR connection of condition is generated in the WHERE clause.Each of the linked part-statements/part-conditions represent an entreyof the input table [itab].
Example
The open SQL statement
SELECT ... FOR ALL ENTRIES IN itab WHERE f = itab-f.
is displayed depending on the parameter rsdb/prefer_union_all as followson standard-compliant SQL:

  • rsdb/prefer_union_all = 0 (and rsdb/prefer_in_itab = 0)

  • SELECT ... WHERE f = itab[1]-f
    OR f = itab[2]-f
    ...
    OR f = itab[N]-f
    • rsdb/prefer_union_all = 1

    • SELECT ... WHERE f = itab[1]-f
      UNION ALL SELECT ... WHERE f = itab[2]-f
      ...
      UNION ALL SELECT ... WHERE f = itab[N]-f
      Here N refers to the number of lines in itab and itab[i]-f the value ofthe field f in the i table row.

      Work area
      Database

      Parameter unit
      1 / 0

      Default value
      The default value is database-dependent. A common, artifical value (-1)must be specified for technical reasons. The original default values arespecified below for each database system. Caution: As these values arechanged by kernet patches, take the current default values from SAP Note48230.
      DB2/390
      1
      DB2 UDB
      1
      Informix
      1
      iSeries
      MaxDB
      1
      MS SQL Server
      1
      Oracle

      Other parameter
      rsdb/prefer_in_itab_opt