「customer_requests」というテーブルがあります。
[CustomerRequestID]
[Title]
[Description]
[RFQDate]
[Q2CDate]
[QuantityRequested]
[GST]
[NetCost]
[Markup]
[NetSellPrice]
[GrossSellPrice]
[fkCustomerID]
[Status]
そして、「ジョブ」と呼ばれるテーブル:
[JobID]
[JobTitle]
[Description]
[fkCustomerRequestID]
[fkSupplierID]
[fkSupplierQuoteID]
[Quantity]
[Cost]
[Status]
[ETA]
[LoggedBy]
[DeliveryAddress]
[ParentJobID]
両方のテーブルからすべてのエントリを選択し、次のテーブルに表示する選択クエリを作成したいと考えています。
[QuoteNumber] (refers to CustomerRequestID in customer_requests, and fkCustomerRequestID in job)
[JobNumber] (refers to JobID in job, and is blank if the entry is from customer_requests)
[CustomerName] (selected using fkCustomerID in customer_requests, selected using fkCustomerRequestID->fkCustomerID in job)
[SupplierName] (selected using fkSupplierID in job, blank if entry is from customer_requests)
[JobTitle] (refers to title in customer_requests, and JobTitle in job)
[Quantity] (refers to QuantityRequested in customer_requests, and Quantity in Job)
[Cost] (refers to GrossSellPrice in customer_requests and Cost in Job)
[ETA] (refers to ETA in Job, and blank if the entry is from customer_requests)
[Status] (refers to Status in customer_requests, and Status in Job)
この 2 つを結合してこのテーブルを作成するにはどうすればよいでしょうか?