|
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 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.