Hi All,
I have two views
TenantPayments - This holds tenant weekly rent payments to us
OwnerPayments - This holds monthly payments to property owner whom we pay
I'm trying to join these two views using the prop code column and get 297 rows when I run the select statement for a property with prop code 3856. The total no of rows should be 27
select ttp.[Trans Date],ttp.[Prop Code], ttp.[Weekly Amount] ,owp.Monthly_Total from ownerpayment AS owp
LEFT OUTER JOIN tenantpayment ttp ON ttp.[Prop Code] = owp.PROP_CODE
Where [Prop Code] = '3856'
What I really need is to sum the weekly payments ( i.e column weekly Amount) and get the Monthly_Total in the same row.
- Edited by jaggy99 1 hour 44 minutes ago added new info