imrohithsnair Posted March 5, 2021 Share Posted March 5, 2021 MYSQL with clause in Jasperreport and Jasper Soft StudioWITH tb1 AS (SELECT a, b FROM table1), tb2 AS (SELECT c, d FROM table2)SELECT b, d FROM tb1 JOIN tb2WHERE tb1.a = tb2.c;I need to use query like above example in MySql dataset, can i able to use?I have tried like this but i couldn't able.Thank You in advance Link to comment Share on other sites More sharing options...
jabrown Posted March 19, 2021 Share Posted March 19, 2021 You need to configure the SQL validator on Jaspersoft Server to accept WITH as valid syntax. TIBCO's default installation of Jaspersoft Server does not accept the WITH syntax to help prevent against SQL injection. More on SQL injection from the Jaspersoft Server Security Guide. You can add WITH to the valid SQL syntax by doing the following. Open jasperserver-pro/WEB-INF/classes/esapi/validation.properties Append the following to the ValidSQL rule: Validator.ValidSQL=(?is)^\s*(select|with)\s+^;+$ Close the file and restart the server. The ValidSQL rule will now allow for the words "select" or "with" to be at the beginning of a query. 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