Subject | Re: [firebird-support] SQL UNION ALL |
---|---|
Author | Alberto Pesce |
Post date | 2005-02-24T19:15:54Z |
I tryed your's solutions but not run because if I remove the statemant Group
by and Order from the first select the function SUM in Select statemant
don't accepted.
At this point
the solution suggeted with "....set_condition_1 OR set_condition_2.... " is
probably what I search.... but I don't know how to use the statemant IF THEN
ELSE in Select statemant.
Any suggest?
Thanks a lot
Bye
Alberto Pesce
by and Order from the first select the function SUM in Select statemant
don't accepted.
At this point
the solution suggeted with "....set_condition_1 OR set_condition_2.... " is
probably what I search.... but I don't know how to use the statemant IF THEN
ELSE in Select statemant.
Any suggest?
Thanks a lot
Bye
Alberto Pesce
----- Original Message -----
From: "Alberto Pesce" <palberto@...>
To: "firebird-support" <firebird-support@yahoogroups.com>
Sent: Thursday, February 24, 2005 4:15 PM
Subject: RE: [firebird-support] SQL UNION ALL
>
> Thanks very much to all collaborators.
>
> This evening I try all your's solutions, and I reply the best Query.
>
> Thanks again!
> Bey
> Alberto Pesce
>
>
> >
> > Hi
> >
> > > Hi all,
> > >
> > > why this union don't work:
> > >
> > > SELECT SUM(A), B, C, D
> > > FROM X,T,Z
> > > WHERE set_condition_1
> > > GROUP BY B, C, D, A
> > > ORDER BY B
> > >
> > > UNION ALL
> > >
> > > SELECT SUM(A), B, C, D
> > > FROM X,T,Z
> > > WHERE set_condition_2
> > > GROUP BY B, C, D, A
> > > ORDER BY B
> > >
> > > The queries above (separated) work fine but if I use the
> > > statemant union I obtain a SQL error.
> >
> > What about:
> >
> > SELECT SUM(A), B, C, D
> > FROM X,T,Z
> > WHERE set_condition_1 OR set_condition_2
> > GROUP BY B, C, D, A
> > ORDER BY B
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
> ____________________________________________________________
> Navighi a 2 MEGA e i primi 3 mesi sono GRATIS.
> Scegli Libero Adsl Flat senza limiti su http://www.libero.it
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>