Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
davidshq
Posting Yak Master
119 Posts |
Posted - 2006-02-04 : 20:55:28
|
I am using ASP.NET 2.0 with SQL Server 2005 as my database back-end. My site is GameSecretary.Com. I have around 300 games organized into ten general categories. But these games have other relationships that I want reflected. If one currently views a DetailView of a game on the site it looks like this:IDTitlePopularityOverall PopularityDescriptionDangersVariantsSourceLast PlayedTypeI would like to add:RelatedIn the instance of the game "Traditional Dodgeball" in the related field would be the following:Dr. Dodgeball, Freeball, Points Dodgeball, Tag Dodgeball, Shark Dodgeball.The problem is, going from the underlying data source to the DetailsView. The underlying Relationships data is contained in a table entitled GameRelationships and containing three columns:ID - auto-increment unique identifiergID - ID of the gamerID - ID of the game to which it is relatedSo there are multiple rows containing the data for the above field. It might look something like this:1 - 3 - 15 (Dr. Dodgeball)42 - 3 - 17 (Freeball)72 - 3 - 14(Points Dodgeball)8 - 3 - 78 (Tag Dodgeball)50 - 3 - 100 (Shark Dodgeball)How do I take these multiple rIDs and combine them into one column and convert their numeric IDs to a textual name.David.- http://www.gamesecretary.com/- http://www.thehungersite.com/- http://www.grid.org/ |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|