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 2000 Forums
 SQL Server Development (2000)
 Inner Join

Author  Topic 

glennandrewcooper
Starting Member

5 Posts

Posted - 2006-06-02 : 08:06:33
Hi there,

Lets say I have three tables as follows:

SalesInvoices,
SalesTransLink,
Transactions

The SalesTransLink table is simply a link to resolve the many-to-many issue.

I want to select all records from SalesInvoices, and all Transactions where they are linked, however, I also want some criteria to be placed on one of the Transaction rows that I DON'T want to filter through to the Sales Invoices. For those Transacions that have been filtered out, I want the query to return null values instead.

Does this make sense? The following link for an image may explain it better...
[url]www.merlinaccounts.co.uk/VAT.jpg[/url]

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-02 : 08:41:10
Duplicate post
http://sqlteam.com/forums/topic.asp?TOPIC_ID=67126

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -