db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John English <john.fore...@gmail.com>
Subject Re: "Conglomerate could not be created"?
Date Sat, 02 Jun 2012 10:18:42 GMT
On 01/06/2012 15:19, John English wrote:
> I'm having trouble with the following error: "Conglomerate could not be
> created". It happens when I do this:
>   INSERT INTO resource_usage (resid,itemid,itemtype)
>     (SELECT resid,?,? FROM resource_usage
>      WHERE itemid=?
>      AND   itemtype=?
>      AND   NOT EXISTS (SELECT resid FROM resource_usage
>                        WHERE itemid=? AND itemtype=?));
I also get the same error from this, which looks fairly innocuous to me:

INSERT INTO resource_usage (resid,itemid,itemtype)
    (SELECT resid,20,'final' FROM resource_usage WHERE itemid=? AND itemtype=?);

Is it perhaps because I'm inserting into the same table I'm selecting from?
John English 	If we were to define a religion to be a system of thought 
which contains unprovable statements, so it contains an element of 
faith, then Gödel has taught us that not only is mathematics a religion 
but it is the only religion able to prove itself to be one.
--- John Barrow, /Pi in the Sky /

View raw message