Re: [firebird-support] Re: Request new feature - better perfomance

2014-10-21 Thread topprole...@yahoo.com [firebird-support]
For such complicated updates, you should create stored procedure, or something like: execute block as declare variable :sum; begin select sum(zahtev - skinuto) from rizhp p, rizah z where p.pgod = s.pgod and p.robid = s.robid and z.pgod = p.pgod and z.sklad = p.sklad and z.brzah =

Re: [firebird-support] Re: Request new feature - better perfomance

2014-10-21 Thread 'Djordje Radovanovic' softsis...@sbb.rs [firebird-support]
Yes, after first execution I went to store procedure. for select robid,kolicina,rezerva from rprbs where pgod = :i_pgod and sklad = :i_sklad into :v_robid,:v_kolicina,:v_rbsrezerva do begin select sum(zahtev - skinuto) from rizhp p, rizah z where p.pgod = :i_pgod and p.sklad =

[firebird-support] PSQL: Getting both aggregation and individual rows

2014-10-21 Thread Josef Kokeš j.ko...@apatykaservis.cz [firebird-support]
Hi! Is there a simple way to get an aggregation of some query as well as the individual rows from within a PSQL? I.e., I have a stored procedure GEN_DATA which produces individual rows (ID, Name, DateAndTime, Value). I am processing the output of GEN_DATA in another stored procedure PROCESS_DATA:

Re: [firebird-support] PSQL: Getting both aggregation and individual rows

2014-10-21 Thread Josef Kokeš j.ko...@apatykaservis.cz [firebird-support]
Seems like I will have to use a temporary table for this purpose. But if there is another way, I would be interested in knowing it. Josef Hi! Is there a simple way to get an aggregation of some query as well as the individual rows from within a PSQL? I.e., I have a stored procedure

Re: [firebird-support] How do I return an accurate COUNT(*) when a JOIN is involved?

2014-10-21 Thread 'Softtech Support' stwiz...@att.net [firebird-support]
Good Morning All, I'm back from vacation and wanted to check in to see if there was any other ideas on this issue since I sent this reply on Oct 14th. Thanks, Mike - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To:

[firebird-support] Re: firebird version vs version flamerobin to install using the apt-get command Ubuntu/Debian

2014-10-21 Thread map...@gmail.com [firebird-support]
Hello for ubuntu there is a ppa with 2.5.3 if you are using ubuntu 12.04 or 14.04 https://help.ubuntu.com/community/Firebird2.5 https://help.ubuntu.com/community/Firebird2.5 Also you can use firebird server 2.5.3 installed from tar.gz with fbclient 2.5.x installed by flamerobin as

RE: [firebird-support] PSQL: Getting both aggregation and individual rows

2014-10-21 Thread 'Edward Mendez' emendez...@nc.rr.com [firebird-support]
Josef, Not sure if this will be efficient depending on number of rows, but this is another way without using a TEMP_TABLE. SELECT gen_data.id, gen_data.name, gen_data.dateandtime, gen_data.value, T1.min_dateandtime, T1.total_value FROM gen_data(...) INNER JOIN (SELECT name,

Re: [firebird-support] PSQL: Getting both aggregation and individual rows

2014-10-21 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
What about FOR WITH TMP(MyDateTime, MySum) as (SELECT MIN(dateandtime), SUM(Value) FROM gen_data(...)) SELECT g.id, g.name, g.dateandtime, g.value, t.MyDateTime, tMySum FROM gen_data(...) g CROSS JOIN tmp t Of course, you may want a different join to CROSS JOIN. HTH, Set

Re: [firebird-support] PSQL: Getting both aggregation and individual rows

2014-10-21 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On Tue, 21 Oct 2014 09:39:44 +0200, Josef Kokeš j.ko...@apatykaservis.cz [firebird-support] firebird-support@yahoogroups.com wrote: Hi! Is there a simple way to get an aggregation of some query as well as the individual rows from within a PSQL? I.e., I have a stored procedure GEN_DATA which

[firebird-support] how to have different (conditional) order by clause with same select

2014-10-21 Thread Alan J Davies alan.dav...@aldis-systems.co.uk [firebird-support]
Hi, I have a number of SPs with several joined tables, sub-selects and case statements. The only variation is the index or order by clause used. When user requirements change, I have to ensure that all the different SPs are updated (a Pain). Any help/advice would be welcome, thanks. Ideally,