Re: function DECODE and triggers

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: function DECODE and triggers
Дата
Msg-id 435F6FFD.2030502@magproductions.nl
обсуждение исходный текст
Ответ на Re: function DECODE and triggers  ("Rafael Montoya" <rafo-mm@hotmail.com>)
Список pgsql-general
Rafael Montoya wrote:
> Thanks for your answer, and if i have many options like
>
> decode
> (pre.C_EST,'01','U','02','M','03','W','04','D','05','O','06','S','') as Est
>
> do i have to write many else options in this way?
>
> select case when pre.C_EST = '01' THEN 'U'
>         ELSE when pre-C_EST = '02' THEN 'M'
>           ...
>         END AS EST

You could write a stored procedure that does what you want.

--
Alban Hertroys
alban@magproductions.nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
    7500 AK Enschede

//Showing your Vision to the World//

В списке pgsql-general по дате отправления:

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: function DECODE and triggers
Следующее
От: "Venki"
Дата:
Сообщение: How to get the value in the lastvalue field