Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing duplicates

Status
Not open for further replies.

guineamation

Programmer
Jan 29, 2002
58
IL
How can I suppress apparition of duplicate values when writing the contents of a retrieved recordset?
 
From the Transact SQL Reference:

Eliminating Duplicates with DISTINCT-
The DISTINCT keyword eliminates duplicate rows from the results of a SELECT statement. If DISTINCT is not specified, all rows are returned, including duplicates.
 
Code:
old_value = ""

while not rs.oef

  if old_value <> rs("value") then
    response.write rs("value")
    old_value = rs("value")
  end if

wend


Bastien

Cat, the other other white meat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top