Jump to content
We've recently updated our Privacy Statement, available here ×

SET LOCAL TimeZone, compound sql, transaction


roosit

Recommended Posts

to query views depending on a set timezone, i need to be able to run something like this:

BEGIN;
SET LOCAL TimeZone='Pacific/Enderbury';

SELECT NOW() AT TIME ZONE (SELECT current_setting('TIMEZONE')) ;
COMMIT;
 

The set local is setting the timezone only for this transaction. Anybody have a suggestion on how to implement this in a single report?

Thanks in advance

PS.  just curious, why is valid sql not simply executed?

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I have seen lots of posts of people requiring to run compound sql queries. Has some one already thought about creating a patch for the query executer / validator?

net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:137

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