I have the below SQL Script which is running fine in MySQL:
set @Sunday1WeekAgo = subdate(curdate(),date_format(curdate(),'%w')+7);
select COUNT(DISTINCT TITLE) PagesCreated
where CONTENTTYPE='PAGE' AND SPACEID is not null
But when I put it in Pocket Query SQL statement, it can be executed well.
the page has this error information:
There were errors executing this statement.
There were errors executing this statement. Please check whether the following parameters are given: . If the parameters are correct or no parameters are required, something must be wrong with the query or the database connection. Use the debug mode for a error trace and/or contact your administrator.
Is it beacuse PocketQuery macro cannot identify mySQL var - @Sunday1WeekAgo ?
Anyone can help?
Probably the Spring JDBC Query is having problems with the SET command before the SELECT statement. Why not using this statement?
Just an idea,
select COUNT(DISTINCT TITLE) PagesCreated from CONTENT where CONTENTTYPE='PAGE' AND SPACEID is not null having creationdate>=subdate(curdate(),date_format(curdate(),'%w')+7);
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot