SELECT prh.header_id , prh.staff_id , prh.name , prh.description , prh.create_date , prh.timezone_id , m.market_id
, m.market_name , agy.agency_id , agy.agency_name , adv.advertiser_id , adv.advertiser_name , prh.product
, prh.survey_id , o.office_id , o.office_name , ae_staff_id , st.first_name AS ae_first_name ,
st.last_name AS ae_last_name , prh.flight_start_date , prh.flight_end_date , prh.flight_month , prh.demo_id
, d.demo_name , prh.points_goal , prh.syscode_summary , prh.network_summary , prh.daypart_summary ,
prh.weekly_summary, prh.bmonth_summary , prh.client_code , prh.product_code , prh.estimate_code , prh.geography_id ,
g.description as geography_name , prh.survey_source_id , ss.source as survey_source_name, prh.show_hh
, isnull(prh.show_survey, 0) as show_survey , isnull(prh.display_type, 0) as display_type ,
isnull(prh.Show_Ratings_Imps, 3) as Show_Ratings_Imps , isnull(prh.Zone_Consolidate, 0) as Zone_Consolidate ,
isnull(prh.Order_Num_Display, prh.survey_id) as Order_Num_Display , isnull(prh.Total_GRPs, 0) as Total_GRPs
, (SELECT EST.iPlus FROM NCCCableBuy.dbo.Survey SUR JOIN NCCCableBuy.dbo.Estimate EST ON
SUR.Estimate_ID = EST.Estimate_ID
WHERE (SUR.Survey_ID = prh.Survey_ID)) AS iPlus
FROM post_saved_report_header prh
LEFT JOIN survey_source ss on prh.survey_source_id = ss.survey_type_id
LEFT JOIN geo_type g on prh.geography_id = g.geo_id
LEFT JOIN market m ON prh.market_id = m.market_id
LEFT JOIN ac_agency agy ON prh.agency_id = agy.agency_id
LEFT JOIN ac_advertiser adv ON prh.advertiser_id = adv.advertiser_id
LEFT JOIN staff st ON prh.ae_staff_id = st.staff_id
LEFT JOIN office o ON prh.office_id = o.office_id
LEFT JOIN demo d ON prh.demo_id = d.demo_id
WHERE prh.header_id = 246