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)
 Joining Multiple Tables

Author  Topic 

DMarmolejos
Yak Posting Veteran

65 Posts

Posted - 2008-06-26 : 15:48:51
SELECT

FROM ORDR INNER JOIN RDR1 ON ORDR.DocEntry = RDR1.DocEntry INNER JOIN OSLP ON ORDR.SlpCode = OSLP.SlpCode, INV10

WHERE

GROUP BY



This code works, but how can I join INV10 as well? The unique identifier that INV10 has is DocEntry

RDR1 has DocEntry as well
and so does ORDR

Any help is appreciated, thank you.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-26 : 16:35:57
INNER JOIN INV10 ON INV10.DocEntry = RDR1.DocEntry (or perhaps ORDR.DocEntry)

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

DMarmolejos
Yak Posting Veteran

65 Posts

Posted - 2008-06-26 : 17:10:47
thanks but that didnt fix it.. am i putting this together right?

FROM ORDR INNER JOIN RDR1 ON ORDR.DocEntry = RDR1.DocEntry INNER JOIN OSLP ON ORDR.SlpCode = OSLP.SlpCode INNER JOIN INV10 ON INV10.DocEntry = RDR1.DocEntry
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-26 : 17:13:43
It looks fine to me.

When you say it didn't "fix" it, could you provide more info?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -