470,618 Members | 1,697 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,618 developers. It's quick & easy.

DB2 - Beyond case statements

All - below is part of a construct I am using. I have some very complex data and processing to perfrom and I need a way to get beyond case limitations.
Anyone know of other more robust constructs available in SQL - DB2.
The book says only 3 levels of nested case statements are allowed - that is true.
Any assistance would be appreciated.

select
field1
, field2

,case

when < condition >
then statement
else
case
when
then
when
then
when
then
( up to 12 times
end

I do this 9 times, it will work.

When I add a tenth structured statement, it fails


end as "Field Name"


from
mulitple tables / joins, etc.
Oct 11 '06 #1
0 3021

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

26 posts views Thread by Joe Stevenson | last post: by
7 posts views Thread by Zorro | last post: by
10 posts views Thread by clueless_google | last post: by
10 posts views Thread by Chih-Hsu Yen | last post: by
10 posts views Thread by Brett Romero | last post: by
17 posts views Thread by Navodit | last post: by
13 posts views Thread by Satya | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.