Re: alias and select filter from sql
Posted in 2008
OOOPs sorry too trigger happy.... corrected..
SELECT CASE nvl(MyLocationStatus,"NULL")
WHEN 'I' THEN 'INVALID'
WHEN 'V' THEN 'VALID'
WHEN 'NULL' THEN 'NULL'
ELSE 'UNKOWN'
END
FROM location
Superboer.
way fast=http://www.clipjes.nl/clip/nederlands/n/normaal_-
_oerend_hard.html
On 25 mrt, 19:26, "vchu via DBMonster.com" <u42118@uwe> wrote:
> i tred this, but it said synatx error
>
> SELECT Status> when 'I' then 'InVALID'
> when 'V' then 'VALID'
> else 'unknown'
> end
> FROM location;
>
> am i missing something??
>
>
>
> Superboer wrote:
> >SELECT nvl(MyLocationStatus,"NULL")
> >WHEN 'I' THEN 'INVALID'
> >WHEN 'V' THEN 'VALID'
> >WHEN 'NULL' THEN 'NULL'
> >ELSE 'UNKOWN'
> >END
> >FROM location
>
> >> select
> >Round(([act_arrival_dt]-(DateValue([appt_nlt_date])+TimeValue(
> >> [appt_nlt_time])))*24*60) AS VarianceInMins from appointment;
>
> >hmmm dono whar the above all means, however this can be done in an
> >spl.
>
> >Superboer.
>
> >way fast=http://www.clipjes.nl/clip/nederlands/n/normaal_-
> >_oerend_hard.html
>
> --
> Message posted via DBMonster.comhttp://www.dbmonster.com/Uwe/Forums.aspx/informix/200803/1