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//