Skip to content
Advertisement

Getting error while creating View in SQL server

Hi Could any one please help me while creating a view in SQL server toad I’m getting below error.Thanks in Advanced.

Error:- SQL Server Database Error: Incorrect syntax near the keyword ‘with’.

Advertisement

Answer

A CTE must be the first part of the batch, docs are here.

Change the body of your view to something like this:

EDIT: with added INCIDENT__ID

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement