select 'T' as src,(if tbon is null or tbon < '1900/12/12' or tbon > '1900/9/30' then 'U' else
'P' endif) as pres from ftrans
select 'T' as src,(CASE
WHEN tbon is null
or tbon < '1900/12/12' or tbon > '1900/9/30' THEN 'U' ELSE 'P' END)
as pres from
ftrans
I think it works in Oracle too :)
Pay attention at tbon < '1900/12/12'. Try
to use conversion on date formats like to_date() or
to_timestamp().
Good luck
|
- [SQL] Conversion from Sybase ASA Richard Sydney-Smith
- Re: [SQL] Conversion from Sybase ASA Viorel Dragomir
- Re: [SQL] Conversion from Sybase ASA Ian Barwick