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 |
|
tmcivery
Starting Member
46 Posts |
Posted - 2009-07-13 : 13:26:08
|
| Hey all,I'm trying to piece together a query that I will use in a SRSS report and I'm running into some difficulty.In the database I'm working on there are three different MAC address fields(In the client table) that could carry a MAC address that is used to link back to another table(Port History). I'm going to have to join these two tables 3 times to get the query to work properly. This is what I have so far:SELECT PortHistory.Port, Client.Client ,Client.MacAddr1, Client.Memos, Client.sysMachine, Client.IPAddr1FROM Client JOIN PortHistory ON Client.MacAddr1 = PortHistory.MacAddr Or FROM ClientJOIN PortHistory ON Client.MacAddr2 = PortHistory.MacAddr-----------------------Now I'm probably totally off trying to use the "Or" statement here but with the limited knowledge I have to t-sql this was all I could think to get this to work. If someone could point me in the right direction on this it would be greatly appreciated.Tony |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-13 : 13:33:07
|
JOIN PortHistory ON PortHistory.MacAddr IN (Client.MacAddr1, Client.MacAddr2) N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|
|