Here AS is dbname and dbo is schema and MULTIPLE_SUBSCRIBERS is a table.
Error as follows:
Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'AS'.
Kindly help.
Here AS is dbname and dbo is schema and MULTIPLE_SUBSCRIBERS is a table.
Error as follows:
Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'AS'.
Kindly help.
AS
is a keyword. The way you added it to the sql statement tells SQL Server to interpret it as such.
To use the database name AS
, you need to use the following:
SELECT * FROM [AS].dbo.MULTIPLE_SUBSCRIBERS;
When using square bracket, SQL Server will always interpret the text as a name. This also works for names with spaces. For more see: What is the use of the square brackets [] in sql statements?