Query Failed. Contact portal administrator. System.Exception: WITH sd AS
(SELECT sm.crs_cde, sm.SCHOOL_CDE, sm.CRS_COMP1to8 + '.' + RTRIM(sm.crs_comp3) + RTRIM(sm.CRS_COMP4) AS [Course],
RTRIM(LTRIM(sm.CRS_TITLE)) + (CASE WHEN LEN(RTRIM(LTRIM(sm.CRS_TITLE_2))) > 0 THEN (' / ' + RTRIM(LTRIM(sm.crs_title_2))) ELSE '' END) AS [Title],
sm.CRS_ENROLLMENT Enrld, sm.CRS_CAPACITY AS [Seats], nv.first_mi_last AS [Instructor], sm.CREDIT_HRS AS [Credits], sm.UDEF_5_2_1 F2F ,sm.SECTION_NOTE AS [Notes],
isnull((select ytst.YR_TRM_SBTRM_DESC from YR_TRM_SBTRM_TABLE ytst where ytst.YR_CDE = sm.YR_CDE and ytst.TRM_CDE=sm.TRM_CDE and ytst.SBTRM_CDE = sm.SUBTERM_CDE), '') Subterm,
ROW_NUMBER() OVER(PARTITION by ss.crs_Cde ORDER BY ss.seq_num_2) AS [Seq],
ISNULL((SELECT loc_Desc FROM LOCATION_MASTER lm WHERE lm.LOC_CDE = ss.LOC_CDE), 'Unassigned') AS [Location],
LTRIM(RTRIM(isnull(ss.monday_cde, '') +ISNULL(ss.tuesday_Cde, '') +isnull(ss.wednesday_Cde, '') + isnull(ss.Thursday_cde, '') + isnull(ss.Friday_cde, '') + isnull(ss.saturday_cde, '') + isnull(ss.SUNDAY_CDE, ''))) AS [Days],
RTRIM(CONVERT(char(7), CAST(isnull(ss.BEGIN_TIM, '') AS time), 100)) + '-' + CONVERT(char(7),
CAST(isnull(ss.END_TIM, '') AS time), 100) AS [Time],
CONVERT(varchar(10), ss.begin_dte, 101) +
CASE WHEN datediff(dd, ss.BEGIN_DTE, ss.END_DTE) > 1
THEN '-' + CONVERT(varchar(10), ss.end_dte, 101)
ELSE ''
END AS [Date(s)],
ss.DAYS_TIM_OVRID AS [dto],
SM.udef_2a_2 "Multicultural?",
sm.UDEF_2A_1 "Area Req",
sm.PESC_COURSE_LEVEL_CDE Honors,
sm.work_exp CBL
FROM SECTION_MASTER_V AS sm, SECTION_SCHEDULES_V AS ss, NAME_FORMAT_BASIC_VIEW AS nv
WHERE sm.YR_CDE = ss.YR_CDE
AND sm.TRM_CDE=ss.TRM_CDE
AND sm.CRS_CDE = ss.CRS_CDE
AND ss.PROFESSOR_ID_NUM = nv.ID_NUM
AND sm.YR_CDE = '2017'
AND sm.TRM_CDE = '30'
AND sm.UDEF_2A_1 > '0'-- is not null
-- sm.UDEF_2A_2 is not null
-- sm.PESC_COURSE_LEVEL_CDE is not null
-- sm.WORK_EXP is not null
and sm.section_sts != 'C')
SELECT case sd.seq when 1 then 'Spring 2018' else '' end as Term,
CASE sd.SEQ
WHEN 1 THEN sd.Course
ELSE ''
END AS [Course],
CASE sd.SEQ
WHEN 1 THEN ltrim(rtrim(isnull(sd.[Multicultural?], '')+isnull(sd.[Area Req], '')+' '+sd.Title+' '+isnull(sd.Honors, '')+isnull(sd.CBL, '')))
ELSE ''
END AS [Title],
case sd.seq when 1 then
(select table_desc from table_detail where column_name = 'arearequirements' and table_value = sd.[area req]) else '' end as Area_Req,
sd.Enrld, sd.Seats AS [Seats], sd.Credits AS [Credits],
sd.Instructor AS [Instructor], sd.Location AS [Location],
CASE
WHEN sd.dto is not null
THEN (SELECT table_Desc FROM TABLE_DETAIL
WHERE COLUMN_NAME = 'days_Tim_ovrid'
AND dto = TABLE_VALUE)
WHEN sd.Days is null AND sd.dto is null
THEN 'TBA'
WHEN sd.Location = 'Online'
THEN ''
ELSE sd.days + ' ' + sd.Time
END AS [Meeting],
sd.[Date(s)]
FROM sd
WHERE SUBSTRING(sd.crs_Cde, 6, 1) < 5
ORDER BY sd.CRS_CDE, Seq
---> System.Data.Odbc.OdbcException: ERROR [42S22] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'CRS_COMP1to8'.
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at CUS.OdbcConnectionClass3.OdbcConnectionClass3.OdbcConn(String sqlStatement, Exception& exReturn, Int32 timeout, List`1 parameters)
--- End of inner exception stack trace ---
at CUS.ICS.SimpleQuery.SimpleQueryExecution.GetData(Guid portletId)
at CUS.ICS.SimpleQuery.Default_View.RenderOutput()
Courses that meet the Core Area Requirements