Using SQL Declare Function or alternatives?

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email with questions or issues requiring TIBCO review or response.

I am a complete beginner with jaspersoft studio and desperately trying to get my head round the nuances of report writing and understanding this. I am trying to create a number of reports with graphs within the studio so here is my dilemma and I am sure it's easy for those of you with knowledge to point me in the right direction. All of my databases store data in strings, dates are stored as e.g. 20141209, normally I use SQL such as; DECLARE @startdate CHAR(8) DECLARE @finaldate CHAR(8) SELECT @startdate=CONVERT(CHAR(8),GETDATE()-1,112), @finaldate=CONVERT(CHAR(8),GETDATE(),112) to return the previous days information requirements. I have tried using this within the Jasperstudio SQL connector and it appears to ignore it. I obviously do not want to re-write the queries daily with the date range(s) but have no idea how I could achieve the same results in studio. Please help Regards R
richard.deans's picture
Joined: Nov 30 2014 - 11:53pm
Last seen: 7 years 6 months ago

0 Answers:

No answers yet