Returning Date Range specified by User Eg. BETWEEN 12/02/2004 AND 24/02/2004
Hola, como estas.
I have a question. In my ASP page, I need to execute from the date range specified by the User. I also need to execute from the selection of table names from a drop down list.
I already abled to display the table selected. I just want to implement the date range so that the number of rows displayed will be cut down to smaller rows to avoid long processing of allocating memories for the display.
I am not sure about this SQL statement, correct me where I wronged.
Is the SQL statement written in this way to collect the date range from the user & selecting only within that range? :
SELECT * FROM " & Request.Form("tblInfo") & "
WHERE reportdate BETWEEN " & Request.Form("BOX1") & " AND " & Request.Form("BOX2")
Is the SQL statement is correct to retrieve table values ONLY within that range??? Do hope to see some replies here. Really need the help. Gracias.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)