Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Want to select all records from one table that do not have corresponding record in another?

I have 2 tables, Orderhed and Invoicehed. Not all orders have been invoiced, so for those there are no records in the invoice tables.

How would I go about creating a button, or list box description that allows me to select all Orders that have not been invoiced? There is no flag on the order that says it has been billed, and creating an expression If(isnull(invoicenum),'Not Invoiced','Invoiced') is not giving the correct results.

1 Solution

Accepted Solutions
Not applicable
Author

Was able to get it to work by using: If(ordernum<>0 and not IsNull(invoicenum),'Billed','Unbilled')

View solution in original post

1 Reply
Not applicable
Author

Was able to get it to work by using: If(ordernum<>0 and not IsNull(invoicenum),'Billed','Unbilled')