Subject Re: [firebird-support] select first & union
Author jft
Then FB 2.0's Derived Tables feature (instead of a stored procedure) may help ...
John
> -------Original Message-------
> From: Nick Upson <nick.upson@...>
> Subject: Re: [firebird-support] select first & union
> Sent: 23 Aug '07 20:27
>
> I can go that route but I'd prefer not to as there are a lot ot
> possible params in the where clause that I'd have to pass in and have
> lots of
>
> where (column1 = :param1 or param1 is null)
>
> On 23/08/07, sasha <[LINK: mailto:selectnull%40gmail.com]
> selectnull@...> wrote:
> > >
> > > almost, the problem is that the select first has no real
> > > meaning without an order by on that select within the union,
> > > but an order by at the point is not allowed
> > >
> > > ideally I would do:
> > >
> > > select first 25 skip 25 'A', id, result from ... ORDER BY id
> > > union select 2, count(*) from ...
> > > order by 1, 2
> > >
> > > but I'm not allowed to do the "ORDER BY id" because it's
> > > within the union
> > >
> >
> > I guess in that case selectable stored procedure should be able to
> produce
> > the set that you want.
> >
> > Sasha
> >
> >
> >
> >
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Visit [LINK: http://www.firebirdsql.org] http://www.firebirdsql.org and
> click the Resources item
> > on the main (top) menu. Try Knowledgebase and FAQ links !
> >
> > Also search the knowledgebases at [LINK: http://www.ibphoenix.com]
> http://www.ibphoenix.com
> >
> >
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>