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 |
|
jacisme
Starting Member
34 Posts |
Posted - 2007-09-05 : 16:25:37
|
| Firstly, thank you for your help!SQL 2000, ASP.I need to create a query using the following:Table1CompanyID (PK)CompanyTable2GameIDGamePublisherID (FK)DeveloperID (FK)Developer2ID (FK)Table1 is, obviously, a list of companies; those companies are related to the publisher and developer columns in table2 (as shown above). The pub, dev and dev2 will mostly contain different companies from Table1. Is this possible? And if so, will someone assist me with a query that will retrieve all the column data for both tables. Lastly, perhaps there is a better layout for the db?Thanks again,JAC |
|
|
jacisme
Starting Member
34 Posts |
Posted - 2007-09-05 : 17:30:30
|
| I have come up with the following query:SELECT G.PublisherID, G.DeveloperID, G.Developer2ID, c1.Company, c2.Company, c3.CompanyFROM (GU_Games GINNER JOIN CompanyList c1ON c1.CompanyID = G.PublisherID)INNER JOIN CompanyList c2ON c2.CompanyID = G.DeveloperIDINNER JOIN CompanyList c3ON c3.CompanyID = G.Developer2IDBUT, I am receiving an error, I believe I need additional delimitters?? Can someone please help? |
 |
|
|
jacisme
Starting Member
34 Posts |
Posted - 2007-09-05 : 17:50:04
|
| Actually, the above is working. Thanks anyway! :) |
 |
|
|
|
|
|
|
|