Quote:
Originally posted by andrewst
You are querying the records in date order, so you should be able to use logic something like this:
Code:
oldDate = 01/01/2001 (i.e. a date before start of real date range)
loop
get record
if record.date != oldDate then
print record.date
end if
print record.person, record.start_time, record.end_time
end loop
Depending on the formatting you use, this could result in:
22/2/03 pat smith 5-1 john 11-2 mark 12-2
23/2/03 pat smith 5-1 john 11-2 mark 12-2
...
or
22/2/03
pat smith 5-1
john 11-2
mark 12-2
23/2/03
pat smith 5-1
john 11-2
mark 12-2
|
This is what I have at the moment..
sql="SELECT empshift.date, shifts.starttime, shifts.endtime, emp.first, emp.last FROM shifts INNER JOIN (emp INNER JOIN empshift ON emp.empid=empshift.empid) ON shifts.shiftid=empshift.shiftid WHERE (((empshift.date) Between (Now()-7) And Now()));"
rs.Open sql, conn
%>
<table border="1" width="100%">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td><%Response.Write(x.value)%> </td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
I'm not great at Recordset Parameters can I insert a display parameter ??