Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Complicated Join

$
0
0

I would like to select a list of customers and add a column to the select to show if the customer is within terms of paying up their due invoices. How would I do it? Right now this is what I have

SELECT CUSTOMER, NAME , ADDRESS, CITY, STATE, ZIP, PHONE, FAX, EMAIL, CELLPHONE FROM CUSTOMERS

I would like to add in a column WithinTerms like so

SELECT CUSTOMER, NAME , ADDRESS, CITY, STATE, ZIP, PHONE, FAX, EMAIL, CELLPHONE, WithinTerms FROM CUSTOMERS

And join it to the Accounts Receivable table to see if any of the invoices are past the terms given to this customer in the customer database then WithenTerms should be false if not it should be true.

How would I do that?


Debra has a question


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>