Subject Re: [firebird-support] select first & union
Author Nick Upson
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 <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 http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>