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 |
|
reddymade
Posting Yak Master
165 Posts |
Posted - 2005-11-14 : 11:35:29
|
| Based on moduletypes table info it has to make a join to the master table to get the title columns data.Tasks table: 5 records example.id moduleid moduletype taskdesc duedate1 23 tablecn mytask1 1130052 14 tableRF mytask2 1230053 07 tableSub mytask3 1130054 18 tableRM mytask4 1130055 09 tableIS mytask5 113005Above table tasks is the child table(common table) for various modules, now i want to get the titles column info of all the parent tables(tablecn, tablerf, tablesub, tablerm, tableis)tasks table has the join info. moduleid and moduletype(which holds table name) to get the title info.But i am confused how to write one single select to get all the various module tables title column data and show in one single resultset.Please can you help me with the select query.select a.id, a.duedate, b.title from tasks a, moduletype bThank you very much for the information. |
|
|
|
|
|