How can i query multiple tables through DAL, i want to achieve following query:
SELECT
eviction.Eviction_ID,
eviction.properties_Property_ID,
eviction.Case_No,
eviction.Case_Type,
eviction.File_Date,
eviction.Court_Date,
eviction.Tenant_1,
eviction.Tenant_2,
eviction.Tenant_3,
eviction.Tenant_4,
eviction.Total_Tenants,
eviction.Company,
eviction.Monthly_Rent_Amount,
eviction.Payment_Due_Date,
eviction.Suit_Status,
eviction.Notes,
eviction.Delinquent_Month_1,
eviction.Delinquent_Month_2,
eviction.Delinquent_Month_3,
eviction.Delinquent_Rent_1,
eviction.Delinquent_Rent_2,
eviction.Delinquent_Rent_3,
eviction.Delinquent_Late_Fee_1,
eviction.Delinquent_Late_Fee_2,
eviction.Delinquent_Late_Fee_3,
eviction.Customer_ID,
eviction.Court_Time,
eviction.Court_House,
ROUND(Delinquent_Rent_1+Delinquent_Rent_2+Delinquent_Rent_3, 2) AS TotalRent,
ROUND(Delinquent_Late_Fee_1+Delinquent_Late_Fee_2+Delinquent_Late_Fee_3, 2) AS TotalLateFee,
ROUND(Delinquent_Rent_1+Delinquent_Rent_2+Delinquent_Rent_3+Delinquent_Late_Fee_1+Delinquent_Late_Fee_2+Delinquent_Late_Fee_3, 2) AS GrandTotal,
eviction.Continuation_Date,
eviction.Continuation_Time,
properties.Property_ID,
properties.customer_Customer_ID,
properties.Property_Address,
properties.Property_City,
properties.Property_State,
properties.Property_ZipCode,
properties.Property_County,
properties.Rental_License_Status,
properties.Rental_License_No,
properties.Note,
properties.Use_Owner_Information,
properties.Property_Owners_Name,
properties.Property_Owners_Address,
properties.Property_Owners_City,
properties.Property_Owners_State,
properties.Property_Owners_Zip,
properties.Upload_Rental_License,
customer.Customer_ID AS Customer_ID1,
customer.
First Name
,
customer.
Last Name
,
customer.
Email Address
,
customer.Phone,
customer.Mobile,
customer.Address,
customer.City,
customer.
State
,
customer.Zip_Code,
customer.Password,
customer.User_Group,
customer.active,
customer.Use_Customer_Name,
customer.Property_Management_Company
FROM eviction
INNER JOIN properties ON eviction.properties_Property_ID = properties.Property_ID
INNER JOIN customer ON properties.customer_Customer_ID = customer.Customer_ID
WHERE (eviction.Eviction_ID =18)