Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,117 of 2,288    |
|    Michael Hill to Michael Hill    |
|    Re: using case, Valid statement?    |
|    19 Feb 04 10:49:27    |
      From: hillmw@ram.lmtas.lmco.com              I can use decode like:              decode(       field1,'first',1,       decode(field1,'second',2,0       )       )              except that this has to be all nested and is very hard to work with. If       I have nine items it becomes very ugly.              Michael Hill wrote:       >       > Is this a valid sql statement:       >       > SELECT       > case field1       > when 'first' then 1       > when 'second' then 1       > else null       > end       > FROM mytable       >       > Mike              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca