Subject RE: [firebird-support]1.5 bug and work around?
Author Mercea Paul
Hi



Maybe is possible to avoid union if you make something like:



Select a.name, sum(b.qty),0,sum(b.bond)

From otw_products b join product_name a on a.pid=b.pid

Where b.whs=''

Group by 1,2,4



Or you can use a stored procedure !



Best regards,

Paul



From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Paul Hope
Sent: 03 June 2008 00:32
To: firebird-support@yahoogroups.com
Subject: [firebird-support]1.5 bug and work around?



Hi
I have come accross what I assume is a known bug in 1.5

select
sum(qty),0,sum(bond),pid
from otw_products where whs='' and pid=:pid
group by 2,4

goes crazy - returns infinite number of lines, where as

select
sum(qty),0,sum(bond)
from otw_products where whs='' and pid=:pid
group by 2

works fine. Variations of putting constants and fields between and after
the sum()s either work, crash the server or return infinite lines.

I need this crazy patern in the select for a union clause to match the
columns in the other part.

Is there a way round?

Regards
Paul

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]