mayuri.kadam Posted July 21, 2017 Share Posted July 21, 2017 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:selectcase when (datatype=0) then "Unknown"else when (datatype=1) then "Integer"else when (datatype=2) then "Float"else "varchar"end Datatype_Dffrom sampleDB; Please help me with this syntax here... Thanks! Link to comment Share on other sites More sharing options...
hozawa Posted July 23, 2017 Share Posted July 23, 2017 If you're just getting syntax error in Jaspersoft Studio, just ignore it and save it. Most of the time, it's possible to execute even when Jaspersoft Studio shows syntax error if you are 100% sure that the sql statement is correct. Link to comment Share on other sites More sharing options...
mayuri.kadam Posted July 24, 2017 Author Share Posted July 24, 2017 got the answer:selectcasewhen (datatype=0) then "Unknown"when (datatype=1) then "Integer"when (datatype=2) then "Float"else "varchar"end Datatype_Dffrom sampleDB Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now