Jump to content

Using case when/if else in jasper dataset sql


Recommended Posts

Hi All,

I am getting a very naive error, I have tried various SQL syntax. My backend DB is DB2.

In my SQL I am trying to do somthing like this:


case when (datatype=0) then "Unknown"

else when (datatype=1) then "Integer"

else when (datatype=2) then "Float"

else "varchar"

end Datatype_Df

from sampleDB;


Please help me with this syntax here...



Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...