C# .NET Web application Oracle Table dynamic date range filter

C# .NET Web application Oracle Table dynamic date range filter

david.j.meyer2@boeing.comdavid.j.meyer2@boeing.com Posts: 54Questions: 15Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Needed to filter data of 300K record oracle table for a date range input by the user. My work around is to pass back to the server code and create a where clause based on user input.

                    editor.Where(q => q.Where("RCP_LIST.REVISION_DATE", "to_date('" + rev_date_filter[1] + "','mm/dd/yyyy')", "<=", false)
                    .AndWhere("RCP_LIST.REVISION_DATE", "to_date('" + rev_date_filter[0] + "','mm/dd/yyyy')", ">=", false));

Is there a better way to do this? I could not find a way to date range filter a column server side.

Thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    Answer ✓

    Hi David,

    I'm not entirely clear on what else you'd be looking for here I'm afraid? What you have is exactly how I'd do it myself (with a date picker on the client-side which I presume you have).

    Regards,
    Allan

  • david.j.meyer2@boeing.comdavid.j.meyer2@boeing.com Posts: 54Questions: 15Answers: 0

    Thanks, Was just making sure there wasn't an easier way. Dave

This discussion has been closed.