Code:
SET ANSI_NULLS ONGO
SET QUOTED_IDENTIFIER ON
GO
/*
Created by Minty - 30/07/2024
Simple example View
Minor mods: Pieter - 31/07/2024
*/
CREATE VIEW [dbo].[vw_My_First View]
AS
SELECT SR.State_Name,
SR.Labels,
SR.Letter,
SR.Summary_of_Changes,
SR.EPA_Stamped_Documents,
SR.EPA_Notification_Documents,
SR.SDS,
SR.Registration_Comments,
SSA.Submision_Email,
SSA.Online_Portal
FROM 72_tbl_State_Registration_Requirements SR
LEFT OUTER JOIN 72_tbl_State_Contacts SC ON SR.State_Name = SC.State_Name
LEFT OUTER JOIN 72_tbl_State_Submission_Access SSA ON SC.State_Name = SSA.State
WHERE SC.Registration_Type Like '%Revisions%' AND SR.Registration_Type ='Revisions/Supplementals';
Unless I'm completely losing my mind, you can't use ORDER BY in a view unless you use TOP...
What happens if you turn the query into a Pass-through query?