[firebird-support] Problem with sub-optimal query plan

2015-02-03 Thread Fulvio Senore mail...@fsoft.it [firebird-support]
I have a database containing(simplifyinga little) a CUSTOMERS table andan INVOICES table. INVOICES contains a foreign key to CUSTOMERS, as you can expect. I want to retrieve rows showing INVOICES data and some CUSTOMERS data so I use an inner join, and I want to see newer invoices first so I

[firebird-support] Problem with a trigger

2015-02-03 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello everybody In a before insert or update trigger I have the following cases: *Case 1:* IF (NEW.MVC_TIPMOV = 'SVT' AND INSERTING AND NEW.MVC_NRODOC = '1') THEN BEGIN END *Case 2:* IF (NEW.MVC_TIPMOV = 'SVT' AND INSERTING OR UPDATING AND NEW.MVC_NRODOC = '1') THEN BEGIN END *Case

[firebird-support] Problem with restore when there is a blr error in a stored procedure

2015-02-03 Thread h...@rs-software.net [firebird-support]
When I make a change in the paramaters of a stored procedure and this procedure is used by another one, it lets me compile the changed procedure without telling my, another one ueses this with different paramters (wrong name, or type or just different number). The same is, when selecting

Re: [firebird-support] Problem with sub-optimal query plan

2015-02-03 Thread Tim Ward t...@telensa.com [firebird-support]
You could try an outer join ... mucky in the extreme but it sometimes forces the optimiser to look at the sane table first ... (yes I know one shouldn't have to do that sort of thing). On 03/02/2015 12:17, Fulvio Senore mail...@fsoft.it [firebird-support] wrote: I have a database

Re: [firebird-support] Problem with sub-optimal query plan

2015-02-03 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Feb 3, 2015, at 8:17 AM, Fulvio Senore mail...@fsoft.it [firebird-support] firebird-support@yahoogroups.com wrote: I want to retrieve rows showing INVOICES data and some CUSTOMERS data so I use an inner join, and I want to see newer invoices first so I add an ORDER BY clause. I only