Hello friends i have 5 tables like below
property_master --> "p_id" , "p_name" , "p_address" , "p_city" , "p_state"
property_unit -->"unit_id" , "p_id" , "unit_name"
unit_info --> "unit_info_id" ,"unit_id" INTEGER,"p_id" ,"p_bathroom" ,"p_bedroom" ,"p_size" ,"p_rent" ,"p_isrent" ,"u_note"
tanant_master --> "t_id" , "t_name" ,"t_cell_no" ,"t_phone_no" ,"t_mail" ,"t_deposit"
property_assign--> "t_assign_id" , "unit_info_id" , "t_id" , "t_start_date" , "t_end_date" , " t_rent_due_day" , "t_lease_alert" , "t_status"
and my query is as below
SELECT property_master.p_id AS "PID",
property_master.p_name AS "PropertyName",
property_master.p_address AS "ProepertyAddress",
property_master.p_city AS "ProepertyCity",
property_master.p_state AS "ProepertyState",
property_master.p_country AS "ProepertyCountry",
property_unit.p_id AS "PUID",
property_unit.unit_name AS "UnitName",
property_unit.unit_id AS "UnitID",
unit_info.p_id AS "UNPID",
unit_info.p_bathroom AS "UNBath",
unit_info.p_bedroom AS "UNBEd",
unit_info.p_size AS "UNSize",
unit_info.p_rent AS "UNRent",
unit_info.u_note AS "UNNOte",
tanant_master.p_id AS "TPID",
tanant_master.t_name AS "TPID",
property_assign.unit_info_id AS "UNITINFOID",
property_assign.t_id AS "UNITINFOID",
property_assign.t_start_date AS "UNITINFOID",
property_assign.t_end_date AS "UNITINFOID"
FROM property_master , property_unit , unit_info ,tanant_master , property_assign where property_assign.unit_info_id=unit_info.unit_info_id
i want that aasign property list and tenant list which is in proeprty _assign table and tanant_master table for all property but when i run above query it is give me wrong output any idea how can i solve it ?
Aucun commentaire:
Enregistrer un commentaire