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 =
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 =
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:
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
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:
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
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,
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
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
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,
10 matches
Mail list logo