June 8, 2006 at 3:06 am
Hi. I'm designing a simplle report in VS2005 that runs on a 2005 Reporting Services Server, and against an Oracle DB.
I have two parameters in the FROM clause, Value1 and Value2. Value2 is mapped to the expression =Today and Value1 I am trying to map to a Date Picker, so that when the report is compiled, the user would pick a start date, and the end date is automatically filled in for them as today's date.
It's Value1 I am having trouble with - I can't seem to get it to read from the user input (i.e. the date picked) and use it in the query. The error is an Oracle one "ORA-01858 a non-numeric character was found where a numeric was expected."
Can anyone see what i'm doing wrong here?
Here's the query, for completeness:
SELECT
ID1.log_date,
ID1.channel,
ID1.operator,
ID1.total,
ID1.count
FROM INCELLIGENCE.LOG_TRANSACTION_DAILY_VIEW ID1
WHERE LOG_DATE BETWEEN to_date('&Value1','MM/DD/YYYY') AND to_date('&Value2','MM/DD/YYYY')
ORDER BY ID1.LOG_DATE DESC
Thanks in advance.
David
June 8, 2006 at 3:16 am
Sorry, to add this...
The problem seems to be that the code is not picking up the date selected at all.
In: WHERE LOG_DATE BETWEEN to_date('&Value1','MM/DD/YYYY') AND to_date('&Value2','MM/DD/YYYY') if '&Value1' is substituted for '01/04/2006' for example, the report runs fine.
Thanks,
David
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply