× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I like that syntax a lot too, and I could swear I've tried it before on
'i' and found it didn't work ... but having just tried on V6R1 it does
indeed work, and a quick check of the reference books says it's been there
since V4R3 or even longer!

--
Kind Regards,
Joe Maguire.




From:
"Dennis Lovelady" <iseries@xxxxxxxxxxxx>
To:
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
Date:
12/01/2010 23:31
Subject:
RE: Can anyone explain this?
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



Portion of SQL statement:
CASE C.ASTOCK WHEN 'N' THEN 'No' WHEN 'Y' THEN 'Yes' END,
CASE C.AFUEL WHEN 'N' THEN 'No' WHEN 'Y' THEN 'Yes' END,

That syntax is foreign to me. I like it (a lot) and it may be valid, but
what I'm used to is:
CASE
WHEN C.ASTOCK = 'N' then 'No'
WHEN C.ASTOCK = 'Y' then 'Yes'
ELSE C.ASTOCK end,

What OS are you using?

Only thing I can think of other than syntax is unprintables after the N or
Y, maybe?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"If I'd known I was going to live so long, I'd have taken better care of
myself."
-- Leon Eldred




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.