db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-171) Need Correlation ID in UPDATE/DELETE statements
Date Fri, 05 Aug 2005 14:59:36 GMT
     [ http://issues.apache.org/jira/browse/DERBY-171?page=all ]

Rick Hillegas updated DERBY-171:
--------------------------------

    Description: 
You currently can't use a correlation ID in an UPDATE/DELETE statement. This makes it cumbersome
to do the following:

UPDATE EMPLOYEE_BONUS
  SET BONUS = (SELECT SUM(BONUSES.BONUS) FROM BONUSES WHERE 
          EMPLOYEE_BONUS.EMPL_ID = BONUSES.EMPL_ID);

The use of a correlation ID makes this easier to code.

UPDATE EMPLOYEE E
  SET BONUS = (SELECT SUM(B.BONUS) FROM BONUSES B WHERE B.EMPL_ID = E.EMPL_ID);

This is particularly important if you get carried away with long SCHEMA and TABLE names!



  was:
You currently can't use a correlation ID in an UPDATE/DELETE statement. This makes it cumbersome
to do the following:

UPDATE EMPLOYEE_BONUS
  SET BONUS = (SELECT SUM(BONUSES.BONUS) FROM BONUSES WHERE 
          EMPLOYEE_BONUS.EMPL_ID = BONUSES.EMPL_ID);

The use of a correlation ID makes this easier to code.

UPDATE EMPLOYEE E
  SET BONUS = (SELECT SUM(B.BONUS) FROM BONUSES B WHERE B.EMPL_ID = E.EMPL_ID);

This is particularly important if you get carried away with long SCHEMA and TABLE names!




Bug 156 appears to be a duplicate of this bug and so should be satisfied by this bugfix.

> Need Correlation ID in UPDATE/DELETE statements
> -----------------------------------------------
>
>          Key: DERBY-171
>          URL: http://issues.apache.org/jira/browse/DERBY-171
>      Project: Derby
>         Type: Improvement
>   Components: SQL
>     Versions: 10.0.2.0
>  Environment: Windows XP SP1 Professional
>     Reporter: George Baklarz
>     Assignee: Rick Hillegas
>  Attachments: bug171.diff, bug171.html
>
> You currently can't use a correlation ID in an UPDATE/DELETE statement. This makes it
cumbersome to do the following:
> UPDATE EMPLOYEE_BONUS
>   SET BONUS = (SELECT SUM(BONUSES.BONUS) FROM BONUSES WHERE 
>           EMPLOYEE_BONUS.EMPL_ID = BONUSES.EMPL_ID);
> The use of a correlation ID makes this easier to code.
> UPDATE EMPLOYEE E
>   SET BONUS = (SELECT SUM(B.BONUS) FROM BONUSES B WHERE B.EMPL_ID = E.EMPL_ID);
> This is particularly important if you get carried away with long SCHEMA and TABLE names!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message