Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » parameter marker(parameter marker)
parameter marker [message #766873] Fri, 16 December 2011 10:29 Go to next message
ADA  is currently offline ADA
Messages: 1
Registered: December 2011
Junior Member
SELECT b.INVOICE_ID, b.SEQUENCE_VALUE, trunc (b.creation_DATE)
FROM pa.painvoices_all b
WHERE b.creation_DATE BETWEEN TO_DATE('2011/12/01','RRRR/MM/DD')
AND TO_DATE('2011/12/05','RRRR/MM/DD')


As a parameter marker (?) to write the SQL query for the condition b.creation_DATE ?

[Updated on: Fri, 16 December 2011 10:31]

Report message to a moderator

Re: parameter marker [message #780644 is a reply to message #766873] Wed, 18 January 2012 16:06 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1560
Registered: July 2009
Senior Member

So, you're wanting to know how to pass user entered dates as your start and end dates in your query? If so, one way you could do it would be to make your "where" statement something like:

WHERE b.creation_DATE BETWEEN TO_DATE('startDate','RRRR/MM/DD') AND TO_DATE('endDate','RRRR/MM/DD')

And then, in your beforeOpen script of your dataSet, run a replace on your query text to replace your startDate and endDate markers with the actual parameter values. The sample database doesn't use the TO_DATE function, so I can't try the (?) marker in place of the date just like in your query. Have you tried it? Do you get an error? Let me know.

Regards,

Michael
http://www.birt-exchange.org


Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Previous Topic:Dynamically Modifying a Report from the BIRT PDF Viewer
Next Topic:Problem integrating BIRT 3.7 with jsf using jsf4birt library
Goto Forum:
  


Current Time: Fri Aug 22 23:43:22 EDT 2014

Powered by FUDForum. Page generated in 0.01843 seconds