Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

logic help needed

0 views
Skip to first unread message

Don Grover

unread,
Jan 16, 2004, 7:31:57 PM1/16/04
to
I have a recordset that returns company names, their are duplicates, sorted
by company name.

sCompanyName = ors("company")

How can I show only one company name from each company and display nothing
for the next name if its the same in the previouse row,

COKE $2.14
$2.16
$2.16
PEPSI $3.13
$3.11
$3.12
FANTA $1.26
$1.26


Regards
Don


Aaron Bertrand [MVP]

unread,
Jan 16, 2004, 7:36:49 PM1/16/04
to
http://www.aspfaq.com/2241

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Don Grover" <spam...@assoft.com.au> wrote in message
news:#D85RFJ3...@TK2MSFTNGP10.phx.gbl...

Ray at <%=sLocation%>

unread,
Jan 16, 2004, 7:49:29 PM1/16/04
to
Here's one way you can do it:

<%
Dim sOldName, sNewName, sCompanyName
sOldName = ""

Do While Not ors.EOF
sNewName = ors.Fields.Item(0).Value
sCompanyName = sNewName
If sCompanyName = sOldName Then sCompanyName = "&nbsp;"

%>
<tr>
<td><%=sCompanyName%></td>
<td>price code here</td>
</tr>
<%
sOldName = sNewName
ors.MoveNext
Loop

%>

Ray at work


"Don Grover" <spam...@assoft.com.au> wrote in message

news:%23D85RFJ...@TK2MSFTNGP10.phx.gbl...

Don Grover

unread,
Jan 16, 2004, 8:17:47 PM1/16/04
to
Thanks Aaron and Ray.
Im trying to code with a Migrain at the moment so not working on all
thrusters 8-).

Regards
Don

"Aaron Bertrand [MVP]" <aa...@TRASHaspfaq.com> wrote in message
news:u%238G$HJ3DH...@TK2MSFTNGP12.phx.gbl...

0 new messages