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 |
|
oahu9872
Posting Yak Master
112 Posts |
Posted - 2005-10-06 : 09:07:15
|
| I am working on a site search function that looks into our database. I need it to look for data that is set up using three different tables...My site has a calendar of events that come out of the database. They are tied to a Client hosting the event, so the record displays when the ID's match up in the Events and Client tables. Along with that event, there is an advertisement, which comes from the Ads table. So my important fields here are...tblEvents - ClientID and OrderIDtblClient - Client IDtblAds - OrderID and AdTextSo I need to search in the AdText field where tblEvents ClientID = tblClient ClientID and tblEvents OrderID = tblAds OrderID. I hope I explained this clearly. Thanks. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-06 : 09:11:06
|
| Select A.AdText from tblEvents TE inner join tblClient Tc on TE.ClientID = TC.ClientID inner join tblAds A on A.OrderID = TE.OrderIDMadhivananFailing to plan is Planning to fail |
 |
|
|
oahu9872
Posting Yak Master
112 Posts |
Posted - 2005-10-06 : 09:14:23
|
| Great, thanks. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-06 : 09:17:48
|
Look for Joins in Books On Line, SQL Server help file to know more about Joins MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|