Re: [firebird-support] Insert existing record into same table several times

2014-08-17 Thread Alan J Davies alan.dav...@aldis-systems.co.uk [firebird-support]
Hi Thomas, thank you, it works perfectly. Alan Alan J Davies Aldis On 17/08/2014 06:47, Thomas Beckmann thomas.beckm...@assfinet.de [firebird-support] wrote: Hi Alan! The reason is very simple: The first select in your procedure is a singleton select, it can deal with one record only,

[firebird-support] Insert existing record into same table several times

2014-08-16 Thread Alan J Davies alan.dav...@aldis-systems.co.uk [firebird-support]
Hi, I have a table similar to this simplified version. Test_table Id integer description char(15) quantity integer sequence_no integer - incremented by insert trigger and generator Id Description quantity sequence_no 1Beermat 11 2Beer Mug 32 3Whisky Glass 1

Re: [firebird-support] Insert existing record into same table several times

2014-08-16 Thread Thomas Beckmann thomas.beckm...@assfinet.de [firebird-support]
Hi Alan! The reason is very simple: The first select in your procedure is a singleton select, it can deal with one record only, because it's no for select Thus you get an error, if there are more than one record that match the condition (quantity1). Do for select Id, description, quantity