Hello,
I'm having a bit of an issue writing the SQL to compare pay to charges for my company. The issue is when writing this report I am only getting results where there are pay and a charge, but in reality, there can be pay without a charge, or a charge without pay. I'm looking for a specific code called 'DET' in both of these tables and I need the query to include even blank values (for example order 1111 doesn't have any charge with this code, but it has some pay to the employee.
I'm running into an issue with the values being excluded for both the chargedetails and the paydetailview table when running this query. When I run them separately I see the values.
Hopefully, I make sense. I can try and explain more if needed. I'm like a intermediate level SQL writer, so maybe this is just the noob in me.
Example data:
PAY TABLE
Order numberDate...