Discuss DTV:  SatelliteGuys Forum  DTV USA Forum  AVS Forum  Digital Home Forum
Login

   RabbitEars.Info   
Sitemap
  
"Suddenly you were gone... from all the lives you left your mark upon..."
Rest in Peace, Neil Peart (9/12/1952 - 1/7/2020) - Blog Post


RabbitEars TV Query

Detailed View

Could not run query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS fac_callsign, (CASE WHEN a.channel_fix THEN a.channel_fix ELSE af.afac_channe' at line 1 SELECT /*+ MAX_EXECUTION_TIME(18000) */ f.display_channel, r.dma_id, f.community_served_city AS comm_city, f.community_served_state AS comm_state, f.owner, IF(l.asrn_fix, l.asrn_fix, l.aloc_asrn) AS asrn, IF(l.cf_ind = 'Y', l.cf_lat_dir, l.aloc_lat_dir) AS lat_dir, IF(l.cf_ind = 'Y', l.cf_lat_deg, l.aloc_lat_deg) AS lat_deg, IF(l.cf_ind = 'Y', l.cf_lat_mm, l.aloc_lat_mm) AS lat_min, IF(l.cf_ind = 'Y', l.cf_lat_ss, l.aloc_lat_ss) AS lat_sec, IF(l.cf_ind = 'Y', l.cf_lon_dir, l.aloc_long_dir) AS lon_dir, IF(l.cf_ind = 'Y', l.cf_lon_deg, l.aloc_long_deg) AS lon_deg, IF(l.cf_ind = 'Y', l.cf_lon_mm, l.aloc_long_mm) AS lon_min, IF(l.cf_ind = 'Y', l.cf_lon_ss, l.aloc_long_ss) AS lon_sec, l.aloc_loc_seq_id, a.aapp_file_num, f.facility_status AS fac_status, af.country_code AS fac_country, IF(l.rcamsl_fix, l.rcamsl_fix, n.aant_rc_amsl) AS rcamsl_horiz_mtr, IF(l.hagl_fix, l.hagl_fix, n.aant_rc_hag) AS hag_rc_mtr, IF(a.svc_code_fix IS NULL OR a.svc_code_fix = '', v.service_code, a.svc_code_fix) AS vsd_service, a.aapp_application_id AS application_id, IF(l.erp_fix, l.erp_fix, q.aafq_power_erp_kw) AS effective_erp, l.vertical_erp, IF(n.aant_rc_haat = 0 OR l.haat_invalid = 'Y', l.calc_haat, n.aant_rc_haat) AS haat_rc_mtr, IF(a.channel_fix, a.channel_fix, af.afac_channel) AS station_channel, f.facility_id, v.*, v.active_ind AS eng_record_type, IF(l.ant_type IS NULL OR l.ant_type = '', n.aant_antenna_type_code, l.ant_type) AS antenna_type, IF(l.ant_pattern IS NULL OR l.ant_pattern = '', n.aant_antenna_record_id, l.ant_pattern) AS antenna_id, IF(l.pol_fix IS NULL OR l.pol_fix = '', n.aant_polarization, l.pol_fix) AS ant_polarization, IF(l.ant_rotation, l.ant_rotation, n.aant_rotation_deg) AS ant_rotation, f.callsign AS fac_callsign, a.aapp_file_num AS app_arn, l.aloc_loc_seq_id AS site_number, n.aant_mechanical_deg, n.aant_true_deg, l.mech_type, l.mech_rotation, l.mech_pattern, fp.legal_name AS party_name FROM facility_lms f INNER JOIN application_facility af ON f.facility_id = af.afac_facility_id INNER JOIN application_lms a ON af.afac_application_id = a.aapp_application_id INNER JOIN license_filing_version v ON a.aapp_application_id = v.filing_version_id INNER JOIN app_location l ON a.aapp_application_id = l.aloc_aapp_application_id INNER JOIN app_antenna n ON l.aloc_loc_record_id = n.aant_aloc_loc_record_id INNER JOIN app_antenna_frequency q ON n.aant_antenna_record_id = q.aafq_aant_antenna_record_id INNER JOIN facility_lms fl ON f.facility_id = fl.facility_id LEFT JOIN facility_applicant fp ON f.facility_uuid = fp.facility_uuid AND fp.contact_ind = 'N' INNER JOIN facility_contact_information fi ON fi.contact_info_id = fp.contact_info_id LEFT JOIN dma_rel r ON f.facility_id = r.facility_id AND r.priority = 1 WHERE a.aapp_application_id = '3e02780ae20f43d39d64cf6212b6c0ea' AND (v.active_ind = 'Y' OR a.active_record = 'V') AND (a.active_record <> 'N' || a.active_record IS NULL) AND v.purpose_code <> 'SCH' AND v.original_purpose_code <> 'SCH' AND (v.purpose_code IN('L2C','CP','RUL','MOD','STA','EXT') OR v.original_purpose_code IN('L2C','CP','RUL','MOD','STA','EXT')) AND v.sub_purpose_code NOT IN('LEG','SIL','SSL') AND v.purpose_code NOT IN('WDR') AND (CASE WHEN (a.svc_code_fix IS NULL OR a.svc_code_fix = '') THEN v.service_code IN('DTV','DTS','DTX','DCA','LPD','LPT','DRT') ELSE a.svc_code_fix IN('DTV','DTS','DTX','DCA','LPD','LPT','DRT') END) ORDER BY f.callsign AS fac_callsign, (CASE WHEN a.channel_fix THEN a.channel_fix ELSE af.afac_channel END), f.facility_id, a.aapp_receipt_date ASC No records found!