join abbott.dbo.users recipients on p_userid=recipients.u_id
join abbott.dbo.users initiators on p_origin=initiators.u_id
join abbott.dbo.users budgetholder on p_origincode=budgetholder.u_id
join abbott.dbo.users modifiedby on p_modifiedby=modifiedby.u_id
join pointsemail on p_id=pe_p_id
left join (select distinct pas_bdr_id, pas_statusid, pas_description from pointapprovalscheme) pointapprovalscheme on p_status=pas_statusID and p_pointsperiod=pas_bdr_id
join abbott.dbo.users recipients on ph_userid=recipients.u_id
join abbott.dbo.users initiators on ph_origin=initiators.u_id
join abbott.dbo.users budgetholder on ph_origincode=budgetholder.u_id
join abbott.dbo.users modifiedby on ph_modifiedby=modifiedby.u_id
join pointsemail on ph_id=pe_p_id
left join (select distinct pas_bdr_id, pas_statusid, pas_description from pointapprovalscheme) pointapprovalscheme on ph_status=pas_statusID and ph_pointsperiod=pas_bdr_id
join abbott.dbo.users recipients on p_userid=recipients.u_id
join abbott.dbo.users awardee on p_userid=awardee.u_ID
join abbott.dbo.users awarder on p_userid=awarder.u_ID
join abbott.dbo.users approver on p_userid=approver.u_ID
join abbott.dbo.users initiators on p_origin=initiators.u_id
join abbott.dbo.users budgetholder on p_origincode=budgetholder.u_id
join abbott.dbo.users modifiedby on p_modifiedby=modifiedby.u_id
join pointsemail on p_id=pe_p_id
left join (select distinct pas_bdr_id, pas_statusid, pas_description from pointapprovalscheme) pointapprovalscheme on p_status=pas_statusID and p_pointsperiod=pas_bdr_id
join abbott.dbo.users recipients on ph_userid=recipients.u_id
join abbott.dbo.users initiators on ph_origin=initiators.u_id
join abbott.dbo.users budgetholder on ph_origincode=budgetholder.u_id
join abbott.dbo.users modifiedby on ph_modifiedby=modifiedby.u_id
join pointsemail on ph_id=pe_p_id
left join (select distinct pas_bdr_id, pas_statusid, pas_description from pointapprovalscheme) pointapprovalscheme on ph_status=pas_statusID and ph_pointsperiod=pas_bdr_id
where ph_clientid='6' and ph_status>0
order by awarded
**********************************
here are the errors i am getting:
Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'awardID'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_u_ID'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_LASTNAME'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_FIRSTNAME'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_RptsTo'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_MI'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_u_SSN'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_TER_TYPE_CAT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_TERRITORY_NO'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_REGION'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'awardee_DISTRICT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'TER_TYPE_CAT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'TERRITORY_NO'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'Region'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'DISTRICT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'RptsRo'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'TER_TYPE_CAT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'TERRITORY_NO'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'REGION'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'DISTRICT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'TER_TYPE_CAT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'TERRITORY_NO'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'REGION'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'DISTRICT'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_ProgramID'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_id'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_points'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_Status'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_PointsDate'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_DateAdded'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_Category'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_AwardCriteria'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'Cash'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ph_PointsPeriod'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'DaysSinceLastStatus'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'LastChangeDate'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ApproverLastLogin'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'Pending'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ProgramName'.
Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'CurrentRecord'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'ClarityTransactionID'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'Spiff'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'Year'.
Bookmarks