This discussion is archived
3 Replies Latest reply: May 7, 2013 6:35 AM by prog RSS

page item (date picker)

prog Newbie
Currently Being Moderated
I have added a date picker to my report . and in the report source I've added a where clause to filter the report as per the selected date(which is one of the columns in the table) but there is nothing shown.
where DATE =:P23_DATE

when I remove the where clause all the records appear and when I return it ..nothing there.
can someone help me?

Edited by: Beena-IT on May 4, 2013 7:19 AM
  • 1. Re: page item (date picker)
    jwellsnh Expert
    Currently Being Moderated
    Please share the code you are trying to run.

    Can I assume that the attribute DATE is a true date?

    Jeff
  • 2. Re: page item (date picker)
    Howard (... in Training) Pro
    Currently Being Moderated
    You have data, that's good. You've isolated the problem to what seems to be the WHERE clause, good. The WHERE clause is simple, good. So, it would seem DATE NOT = :P23_DATE for your query.

    Remember -- or note, if you didn't know this -- page items are (always?, mostly) character strings. As Jeff intimates, if DATE is a date, you will get implicit date conversion in your WHERE clause. (BTW, isn't DATE a Reserved Word?) May I suggest trying "DATE = TO_DATE(:P23_DATE,'your date format here')" to make it an explicit conversion?

    Also, I recommend running any query you are having a problem with in the APEX SQL Commands window. Then you can immediately see what APEX is returning for your query. It helps my debugging a lot.

    Regards,
    Howard
  • 3. Re: page item (date picker)
    prog Newbie
    Currently Being Moderated
    Yes that was correct

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points