Jump to content

Can I pass a query that contains a CASE expression?


mbmorgan

Recommended Posts

In Jaspersoft Studio Professional...

My query looks like this:

select count(field1),
CASE field2
WHEN '...' THEN '...'
...ELSE 'Other'
END as field2
from table
where ...

group by field2

This query works fine when I run it in the actual database client, but when I copy it over to the query dialog box in Jasper and hit "read fields" I get an error:

"Error converting SQL statement into byte array..."

 

What am I doing wrong?

 

Thanks, M.B.Morgan

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 years later...

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