I'm rewriting some ASP for our corporate intranet and there is a lot of redundant information that appears in the "News" section (Populated from an SQL server that I don't have access too) Information such as "date submitted" that I think should be rolled up into a single header.
What I have is this:
12-01-2005 News item 5
12-01-2005 News Item 4
11-30-2005 News Item 3
11-30-2005 News Item 2
11-30-2005 News Item 1
Each piece of that display is pulled from SQL in a recordset object and then displayed through simple ASP.
What I want to see is:
12-01-2005
News Item 5
News Item 4
11-30-2005
News Item 3
News Item 2
News Item 1
I've been able to do this in other languages/reporting systems I work in, but for the life of me can't figure it out in ASP.
My pseudocode below:
If RS(Date) <> RS.previousrow(Date) or RS.BOF Then
Response.Write(Date)
(space)(space)(Space)Response.Write(NewsItem)
Else
(space)(space)(Space)Response.Write(NewsItem)
End if
The only thing I can't figure out is if it's possible to do this movement in ASP, and what the syntax is to do it.
Thanks a bunch.