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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Joins

Author  Topic 

Poddy88
Starting Member

26 Posts

Posted - 2009-02-21 : 10:30:55
i need to gather muitple pieces of information from all different table which are equal to more than one value example.

SELECT cabinet.cabinet_id, router_tocab.router_id
From cabinet
INNER JOIN server_tocab
on cabinet.server_id=server_tocab.Server_ID, cabinet.router_id=router_tocab.router_id
order by cabinet.cabinet_id;

this statement doesn't work and need to no where i am going wrong

thanks

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-21 : 10:34:54
[code]SELECT cabinet.cabinet_id, router_tocab.router_id
From cabinet
INNER JOIN server_tocab
on cabinet.server_id=server_tocab.Server_ID
INNER JOIN router_tocab
ON cabinet.router_id=router_tocab.router_id
order by cabinet.cabinet_id[/code]
Go to Top of Page

Poddy88
Starting Member

26 Posts

Posted - 2009-02-21 : 10:48:50
Thank you VERY MUCH!
Go to Top of Page

Poddy88
Starting Member

26 Posts

Posted - 2009-02-21 : 12:25:17
Is there a way of putting a not statement into this join so it doesnt select anything with the value of 0???
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-22 : 00:59:49
just put where yourfield<>0 before the order by
Go to Top of Page
   

- Advertisement -