Subject Re: [firebird-support] Re: Nasty query construct problem
Author Lucas Franzen
Johan,

> Hmm...it's even worse I think! In my example I used xxxx and yyyy but
> in real life it's xxxx i want in the first column and whatever else
> in the second column. The yyyy can be infinit number of variants!

Does that mean, you want two columns xxxx nett and xxxx gross
and two columns for yyyy nett and yyyy gross where
xxxx = one artno and
yyyy = all other artno ???

If this is the case, it's (with some tricks) possible to do with a sp.


> I'm thinking of doing a datamoving routine before my actual sql that
> moves each row into a new table and in that move put it in column one
> or two and do a per row sum also.
>
> After that it should be straigh forward for a sql query and grouping.

That's ok, too.

Luc.