Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 1.76 KB | None | 0 0
  1. SELECT cit.citation_id, p.permit_num, p.dailygallonlimit,O.owner_company_name, C.service_contract_id, C.system_id, C.service_rep_id, C.trigger_type, C.contract_start_date, C.contract_end_date, C.contract_create_date, C.contract_cost, C.contract_type, C.mod_user_id, C.mod_datetime, C.last_due_date, C.next_due_date, C.contract_maintenance_period, C.contract_maintenance_unit, C.expire_notice_ind, C.renewed_ind, C.contract_sign_date, C.svcWChlorine, C.renewStatus, C.import_source, C.import_date, C.import_id, C.expire_notice_date, C.expire_notice_date2, C.expire_notice1_ind, C.expire_notice2_ind, C.expire_notice3_ind, R.service_rep_name, L.location_id, L.owner_id, L.region_id, L.time_zone_id, L.location_address1, L.location_address2, L.location_city, L.location_state_code, L.location_postal_code, L.location_country_code, L.location_county_id, L.location_lot, L.location_block, L.location_subdivision, L.location_grid_num, L.location_section, L.location_type, L.mod_user_id, L.mod_datetime, L.assoc_id, L.assoc_type, L.location_description, L.notOwnerOccupied, L.notes, L.import_source AS Expr7, L.import_date, L.survey, L.abstract, L.location_tract, L.lat_deg, L.lat_min, L.lat_sec, L.long_deg, L.long_min, L.long_sec, L.key_map_grid, L.key_map_section, S.system_name, M.manufacturer_name from systems S left outer join service_contracts C ON C.system_id = S.system_id left outer join service_reps R on C.service_rep_id = R.service_rep_id left outer join manufacturers M on S.manufacturer_id = M.manufacturer_id, locations L left outer join owners O on L.owner_id = O.owner_id, permits P LEFT OUTER JOIN citations cit ON cit.permit_num = p.permit_num, system_permits SP where L.location_id = S.location_id and S.system_id = SP.system_id and SP.permit_id = P.permit_id and p.permit_num = 'wcd987'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement