This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
are you using sql or pl/sql?
In your initial mail you said pl/sql, but now it seems that you want to use this in an sql query.
You can't write (please correct me if I'm wrong) sql queries with a variable number of columns.
You mean, we can't have this CASE statement in SELECT clause, then let me tell you, I had executed this query on SQL Server 05
No, that is not what I meant. I was refering to the topmost post.
I do have a question on it though. I know you can use case statement in a sql server query. But I think you can't use case to return two columns namedCOLUMN_ONE and COLUMN_TWO if the expression matches, and only one column named COLUMN_THREE if it does not match. What happens if expression is true for row 1, and false for row 2 in the query?
I was asking the original poster what the root of the problem is.
From the first post, I understood that that person was trying to use conditional logic in pl/sql.