Subject Re: [firebird-support] SQL headache
Author Nick Upson
In article <VA.00000391.0b29864e@...>, Nick Upson wrote:
> I have 2 tables, SalesOrder (SO) and salesorderline (SOL). Given a SO
> reference (unique key to SO table) I need to locate any other Sales orders
> with the same combination of orderlines regardless of quantity

missed a bit: I need to do this when I save a SO with it's SOL and not do the
save if I find a matching order that already exists. So the SOL records don't
exist at the time I need to make the check unless I save it all and
rollback/delete if I find one afterwards which is not ideal due to SO
generator values

--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly