Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9291269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:36:33+00:00 2026-06-18T20:36:33+00:00

Think I am being stupid but am getting the error: Msg 195, Level 15,

  • 0

Think I am being stupid but am getting the error:

Msg 195, Level 15, State 1, Procedure
VW_THIRDPARTY_SLA_REPORT_MONTHLY_GP_NONAGGREGATE, Line 8 ‘partitioned’
is not a recognized option.

when trying to execute the following create view statement

CREATE VIEW [dbo].[VW_THIRDPARTY_SLA_REPORT_MONTHLY_GP_NONAGGREGATE] 
With partitioned
AS 
(Select 
B.MSH7_DateTimeOfMessage,
B.PID2x1_PatientIDExternal,
B.PID3x1_PatientIDInternal,
B.PID5x1_PatientName_FamilyName,
B.PV3x2_AssignedPatientLocation_Room,
A.OBR4x2_UniversalServiceID_Text,
A.OBX3x2_ObservationIdentifier_Text,
A.OBR24_DiagnosticServiceSectionID,
A.OBR6_RequestDateTime,
C.TestName,
C.PriceBaseline,
D.Contract,
Row_NUMBER()

OVER(Partition By [ORC3_FillerOrderNumber], [OBX3x2_ObservationIdentifier_Text] order by [ORC9_DateTimeOfTransaction]) as seq
From [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_Detail] A
LEFT OUTER JOIN [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_Header] B ON A.[DETAIL_ID] = B.[HEADER_ID]
LEFT OUTER JOIN [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_View_TFCData] C ON A.[OBR24_DiagnosticServiceSectionID] + A.[OBX3x1_ObservationIdentifier_Identifier] = C.[KEY]
LEFT OUTER JOIN [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_LocationDetail] D ON B.[PV3x1_AssignedPatientLocation_PointOfCare] = D.[PracticeCode] 

)
Select *
from partitioned  
where seq =1 

This is a query that is working nicely in a stored procedure so I am happy with the query just can’t create it as a view.

Any help would be much appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:36:34+00:00Added an answer on June 18, 2026 at 8:36 pm

    You are missing the first AS after the CREATE VIEW:

    CREATE VIEW [dbo].[VW_THIRDPARTY_SLA_REPORT_MONTHLY_GP_NONAGGREGATE] 
    AS --- this is missing
      With partitioned
      AS 
      (
       Select 
          B.MSH7_DateTimeOfMessage,
          B.PID2x1_PatientIDExternal,
          B.PID3x1_PatientIDInternal,
          B.PID5x1_PatientName_FamilyName,
          B.PV3x2_AssignedPatientLocation_Room,
          A.OBR4x2_UniversalServiceID_Text,
          A.OBX3x2_ObservationIdentifier_Text,
          A.OBR24_DiagnosticServiceSectionID,
          A.OBR6_RequestDateTime,
          C.TestName,
          C.PriceBaseline,
          D.Contract,
          Row_NUMBER() OVER(Partition By [ORC3_FillerOrderNumber], [OBX3x2_ObservationIdentifier_Text] order by [ORC9_DateTimeOfTransaction]) as seq
       From [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_Detail] A
       LEFT OUTER JOIN [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_Header] B ON A.[DETAIL_ID] = B.[HEADER_ID]
       LEFT OUTER JOIN [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_View_TFCData] C ON A.[OBR24_DiagnosticServiceSectionID] + A.[OBX3x1_ObservationIdentifier_Identifier] = C.[KEY]
       LEFT OUTER JOIN [NWLHPathApp_DataWarehouse].[dbo].[PathologyHL7_LocationDetail] D ON B.[PV3x1_AssignedPatientLocation_PointOfCare] = D.[PracticeCode] 
    
       )
       Select *
       from partitioned  
       where seq =1 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This time I think it's not me being stupid but an actual conflict. I
I think I am being particularly stupid. I have a link, which is part
I think I'm being really stupid here. I'm using vbscript. I've connected to an
This question is probably pretty stupid, but I'm new to C# and I'm not
I don't know if i'm being stupid and missing something obvious but: I have
I think I'm being stupid. rc = Mysql.new('CENSORED_HOST','username','password','db') release = rc.query('select * from wp_ribcage_releases
This is probably stupid simple, but for some reason I'm having trouble getting it
This might be a conceptually stupid question, but it also might not and since
I like to think i'm not completely useless at creating MS Access databases, but
I'm serious. I installed the Blackberry web developer thing for eclipse (being stupid, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.