Actually I think that would be a grouping issue (once you fixed the 'seletc'
type)... and I hate 'GROUP BY' clauses... they get me every time!

At the risk of being bashed for using 'IN'... try this


select albumtitle, name, year
from album, artist
where albumid = #TheAlbumIdYouWantToGrabArtistsFor#
and artistid in 
(
select artistid from artisttrack where trackid in 
(
select trackid from track where albumid =
#TheAlbumIdYouWantToGrabArtistsFor#
)
)

Unless you have the album with the original "We Are the World" song in
there, I don’t think you'll return enough rows to make a difference in
performance. Heh

If that works for you id turn it into a stored procedure and stick with it.

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.13.28/518 - Release Date: 11/4/2006
5:30 PM
 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259261
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to