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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Trouble retreiving information with 3 tables (

Author  Topic 

jodders
Starting Member

41 Posts

Posted - 2011-04-13 : 07:23:01
Hi,
I have 3 main tables called hbm_client, hba_client_cont and hbm_name.

What I want is to obtain information from the hbm_name table which is linked with a specific name_uno code in hba_client_cont.

hba_client_cont is connected with hbm_client on a Client_uno code.



So far,my Inner Join code looks like this:
from hbm_client a
INNER JOIN (hba_client_cont cc INNER JOIN hbm_name hn ON cc.name_uno = hn.name_uno)
ON a.client_uno = cc.HBA_client_cont

Does this look right? i keep getting an invalid column name 'hba_client_cont'. i am confused because hba_client_cont does exist.

Cheers


nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-04-13 : 08:09:19
from hbm_client a
INNER JOIN hba_client_cont cc
ON a.client_uno = cc. Client_uno
INNER JOIN hbm_name hn
ON cc.name_uno = hn.name_uno


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

jodders
Starting Member

41 Posts

Posted - 2011-04-13 : 09:05:45
Thanks Nigelrivett, looks like i confused myself with what joins where.

much appreciated.
Go to Top of Page
   

- Advertisement -