SELECT callID, datelogged, user, Section, description, Name, dateclosed
FROM closedcalls
WHERE Section = 'MMColParam' AND ((closedcalls.datelogged) BETWEEN #vardatelogged# AND #vardateclosed#)
ORDER BY callID DESC
Here are the variables
Request.QueryString("Section")
and
Request.QueryString("vardatelogged")
and
Request.QueryString("vardateclosed")
Section = G.S.A.
vardatelogged = 01/01/00
vardateclosed = 01/001/02
Can anyone tell me what I'm doing wrong. I'm trying to run a report between two dates and have it displayed in a browser. Thanks
fintan
select subj, sent from Messages_messages where (sent between '7/14/02' and '7/20/02');
returned no results, and no errors.
select subj, sent from Messages_messages where (sent between 'July 14, 2002' and 'July 20, 2002');
returned 25 results.
It's not an explanation, but it might point to a fix.
SELECT callID, datelogged, user, Section, description, Name, dateclosed
FROM closedcalls
WHERE Section = 'MMColParam' AND datelogged BETWEEN #vardatelogged# AND #vardateclosed#
ORDER BY callID DESC
Here are the variables
Request.QueryString("Section")
and
Request.QueryString("datelogged")
and
Request.QueryString("dateclosed")
Section = G.S.A.
vardatelogged = 01/01/00
vardateclosed = 01/001/02
But I'm still having problems passing the dates from the search page to the results page. Do I create a session variable on the search page and a request variable on the results page or do I use a form parameter.
SELECT newdateclosed, callID, datelogged, user, Section, SectionID, description, Name, staff_number
FROM closedcalls
WHERE Section LIKE 'MMColParam' AND staff_number LIKE 'varstaff_number' AND (datelogged BETWEEN format(#vardatelogged#, 'mm/dd/yyyy') AND format(#varnewdateclosed#, 'mm/dd/yyyy'))
ORDER BY callID DESC
MMColParam = Request.QueryString("Section") / default value = %
varstaff_number = Request.QueryString("staff_number") / default value = %
vardatelogged = Request.QueryString("datelogged") / default value = 01/01/2000
vardateclosed = Request.QueryString("newdateclosed") / default value= 01/01/2010