× 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've been working with this data too much. Forgot I had a UNION and I didn't
have the CASE in there. Been one of those weeks.

--
Mike Wills
http://mikewills.info
P: (507) 933-0880 | Skype: koldark


On Tue, Jan 12, 2010 at 2:18 PM, Mike <koldark@xxxxxxxxx> wrote:

I am working on an SQL statement with few CASE statements. I am getting
unexpected results.

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,

Data before CASE added:
STOCK FUEL/OIL
PART IF Y PART IF Y
N N
Y N
N N
N N
Y N
Y N
Y N
Y N
Y N
Y N
N N
N N
Y N
Y N
Y N
Y N
N N
Y N

Data after CASE added:
CASE expression CASE express

No No
Y N
No No
No No
Y N
Y N
Y N
Y N
Y N
Y N
No No
No No
Y N
Y N
Y N
Y N
No No
Y N


Ever seen this before? Any ideas where to even start? We are migrating this
application data from the iSeries to a new system. I am trying to avoid
writing a program if possible.

--
Mike Wills
http://mikewills.info
P: (507) 933-0880 | Skype: koldark


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.