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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to take out duplicates 1

Status
Not open for further replies.

ggreg

Programmer
Mar 9, 2001
201
US
how do I modify the sql below to do ascending order by title and remove duplicates so the titles will not duplicate for the fname and lname and take out the duplicates of name for fname and lname

select title, Fname, Lname, name
from books b, bookauthor ba, author a, publisher p
where b.pubID = p.pubid and b.isbn = ba.isbn
and ba.authorid = a.authorid
/
thanks
 
select DISTINCT title, Fname, Lname, name
from books b, bookauthor ba, author a, publisher p
where b.pubID = p.pubid and b.isbn = ba.isbn
and ba.authorid = a.authorid
/
 
wow that put it into ascending order but did not remove the duplicates should I be using group by but group by is giving me an error?
 
carp I sorry i guess it is working and you did what i wanted it to do thanks!
 
Carp,

GGreg said he was grateful, and I believe him, so please have a purple star from me in his behalf.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 18:56 (29Jul04) UTC (aka "GMT" and "Zulu"), 11:56 (29Jul04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top