Jump to content
Changes to the Jaspersoft community edition download ×

Can't create condition in SQL query (ORA-00936: missing expression)


s.paskevics
Go to solution Solved by nthapa,

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Can you see if any of the following this makes difference?

SELECT name FROM test_table WHERE test_column_name LIKE ($P{PARAM_VALUE} IS NULL ? "%" : $P{PARAM_VALUE})

 

SELECT name FROM test_table WHERE (test_column_name LIKE $P{PARAM_VALUE} and 

$P{PARAM_VALUE} IS NOT NULL ) or (test_column_name LIKE "%" and $P{PARAM_VALUE}) IS NULL)

Link to comment
Share on other sites

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