Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4192

If a column is blank the TEXTAGG function excludes it from the output

    Details

    • Workaround Description:
      Hide

      add NVL for every column as shown below.

      TEXTAGG(FOR NVL(Last_Name, ''),
      NVL(First_Name, ''),
      NVL(Middle_initial,''),
      NVL(Currency_Code, '')
      DELIMITER '|' QUOTE '"'
      )

      Show
      add NVL for every column as shown below. TEXTAGG(FOR NVL(Last_Name, ''), NVL(First_Name, ''), NVL(Middle_initial,''), NVL(Currency_Code, '') DELIMITER '|' QUOTE '"' )
    • Bugzilla Update:
      Perform

      Description

      If a column value is blank, it is excluding it in the result, causing incorrect output.

      TEXTAGG(FOR Last_Name,
      First_Name,
      Middle_initial,
      Currency_Code
      DELIMITER '|' QUOTE '"'
      )

      In the above example, if middle name is blank, then it should still show one empty column with "|" delimiter as shown below.

      Steigner|Debbie||USD

      But it returns output as excluding middle name since it is blank.

      Steigner|Debbie|USD

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                dsteigne Debbie Steigner
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: