This is probably easy to do

Tsango

Registered User.
Local time
Today, 00:43
Joined
Mar 31, 2006
Messages
64
As I am an SQL novice I need some help

I have 3 tables

Table - Fields

SalesLedger - TransactionID, ProductID
Vouchers - TransactionID, Voucher_Ref
Products - ProductID, Product_Description

The Salesledger has fields TransactionID and ProductID

The Salesledger is linked to the Products table by the ProductID field

The SalesLedger is linked to the Voucher Table by the TransactionID field

How do I produce a query to list all the items in the Salesledger but if there is a Product in the Products Table matching the ProductID the Product details, and if there is a TransactronID in the Voucher Table list the VoucherRef.

At the moment, it only shows transactions if there is a corrosponding TransactionID in the Vouchers Table

Probably not explaned this at all well. I will try to elborate if required.
 
SalesLedger - TransactionID, ProductID
Vouchers - TransactionID, Voucher_Ref
Products - ProductID, Product_Description


In your query change the join types to option 2
 

Users who are viewing this thread

Back
Top Bottom