Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4496

Column list size mismatch with ORDER BY in INSERT statement

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0
    • Fix Version/s: 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      Repro attached

      Description

      I see this error on trunk (revision 894516):

      ij> create table t(x varchar(100));
      0 rows inserted/updated/deleted
      ij> insert into t select * from (select * from sysibm.sysdummy1 order by length(ibmreqd)) t1;
      ERROR 42X32: The number of columns in the derived column list must match the number of columns in table 'T1'.

      The statement succeeds if I remove the ORDER BY clause:

      ij> insert into t select * from (select * from sysibm.sysdummy1) t1;
      1 row inserted/updated/deleted

        Attachments

        1. derby-4496.diff
          3 kB
          Dag H. Wanvik
        2. derby-4496.stat
          0.2 kB
          Dag H. Wanvik

          Activity

            People

            • Assignee:
              dagw Dag H. Wanvik
              Reporter:
              knutanders Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: