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 |
|
MariaPiquer
Starting Member
1 Post |
Posted - 2008-05-13 : 22:26:20
|
| Hi,I have 3 tables:Table SLA: SLA_code, SLA_nameTable industry: Industry_code, Industry_nameTable14: SLA_code_origin, SLA_code_destination, Industry_code, FreqI would like to query to get in one table:SLA_name for DESTINATION, Industry_name, FreqNote: SLA_code contains the same codes as SLA_code_origin and SLA_code_destination. All are the same codes in column oringin means the From point and colum destination the To point.How can I query to get the Freq and Industry for those destination SLAs?I have make a relationship between: Table SLA.SLA_code with Table14.SLA_code_destination andTable_industry.Industry_code with Table14.Industry_codeBut I am not sure if just a SELECT SLA.SLA_name, Industry.Industry_name, Table14.FreqFROM SLA, Industry, Table14would select the SLA_destination and not the SLA_origin.Thanks very much in advance,Maria |
|
|
ranganath
Posting Yak Master
209 Posts |
Posted - 2008-05-14 : 00:46:58
|
| Hi,Try with thisSelect S.SLA_name AS 'DESTINATION', I.Industry_name, T.FreqFrom SLA SInner Join Table14 T on T.SLA_code_destination = S.SLA_code_destinationInner Join industry I on I.Industry_code = T.Industry_code |
 |
|
|
|
|
|
|
|