Lionia1979 Posted February 7, 2007 Share Posted February 7, 2007 Hi I have a jasper report fetching data with following query: SELECT datepart(ww, LOGDATE) AS weeks from mc_logs This works. The problem comes when I replace the 'ww' with a parameter like SELECT datepart($P{DATETYPE}, LOGDATE) AS weeks from mc_logs Has anyone tried this or have a workaround? Link to comment Share on other sites More sharing options...
nipo Posted February 15, 2007 Share Posted February 15, 2007 I was looking for the same thing... found another thread and this works for me now... SELECT a,b,c,d FROM table_tWHERE create_timestamp <= DATE('$P!{parameterName}') AND create_timestamp > (DATE('$P!{parameterName}')-INTERVAL '6 days')ORDER BY a [This is PostgreSQL SQL] For me the trick was to add the '!' mark $P!{ParameterName} I trust this to be of assistance!have a great day!NiPo.:silly: Link to comment Share on other sites More sharing options...
Lionia1979 Posted February 15, 2007 Author Share Posted February 15, 2007 Wuawww... it worked!!!:woohoo: Thank you for your tip. 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