Subject | Re: [firebird-support] Question select in Stored procs |
---|---|
Author | Lucas Franzen |
Post date | 2006-01-17T17:40:16Z |
Christian Danner schrieb:
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.
> 4) UNIONbut those will only work for two columns.
>
> 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')
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.