Adding Column to Existing View - Incorrect Syntax near ')'

  • I created a view several years ago that has been working well.  Basically it selects a value from a row directly below it.  Now, I would like to add another column to the view but when I try to save it, I get the error message 'Incorrect Syntax near ')'.  If I try to run just the query, it indicates a problem with the ')' in line 3 (circled in red below).  The field I am trying to add is 'RUN_TYPE' (highlighted in yellow).  Can anyone see what I might be doing wrong?  Thank you, in advance, for your help.

    PRQuery

  • Actual code will be easier for folks to work with than pictures.  I'm not seeing what that close parenthesis is doing there.  There isn't an earlier open paren to match it, and I think what you'd actually want there is something more like:

    FROM dbo.AB_OP_AND_NUMBER AS O
    JOIN (
    SELECT T1.ROWID, ....

     

  • Please disregard.  I found my original CREATE statement from 6 1/2 years ago and was able to create a new view with the field I was missing.  Thank you for your help.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply