Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27501

update multiple columns with a subquery

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      UPDATE Statement with multiple columns should work in SQL/PSM and PL/SQL modes.

      UPDATE on multiple columns within parenthesis or with a multicolumn subquery is not supported

      UPDATE
                      INVST_TRST_TRD ITT
                      SET (ITT.NET_AMT, ITT.PRICE, ITT.REALISED_PL) =
                      (SELECT ISA.NET_AMT, ISA.B_SUM_PRC, ISA.REALISED_PL
       
                      FROM INVST_SPA_AWDATA ISA
                      WHERE
                      ISA.SEC_CD  = isa_sec_cd AND
                      ISA.CLIENT_CD   = ITT.CLIENT_CD AND
                      ISA.DSCR_CD = ITT.DSCR_CD AND
                      ISA.VALUE_DT    = ITT.VALUE_DT
                      )
                      WHERE
                      ITT.TRD_NO  = itt_trd_no AND
                      ITT.CLIENT_CD   = itt_client_cd AND
                      ITT.DSCR_CD = itt_dscr_cd AND
       
                      ITT.VALUE_DT    = itt_value_dt
                      ;
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            manjot Manjot Singh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.