Subject Re: [firebird-support] Question select in Stored procs
Author Lucas Franzen
Christian Danner schrieb:
> 4) UNION
>
> select
> cursus_code as code,
> cursus_descr_nl as descr
> from cursustype
> where (pk_cursustype = :type)
> and (:language = 'nl')
> union
> select
> cursus_code as code,
> cursus_descr_en as descr
> from cursustype
> where (pk_cursustype = :type)
> and (:language = 'en')

but those will only work for two columns.
If there are <n> columns you have to write a union statement for every
column.

Same goes for CASE (which is nothing else than a lot of IFs) and local
variables.
As I understood the question: it was a simplified example with just two
columns...

Luc.