I am running SQL Prompt 4.0.4.14 and have found that in some cases SQL Prompt tries to access a database for no reason, and if you don't have access you get an error.
Say that the server you are working on has a DB named NPI, but you don't have access to it. When you paste this code in to SSMS you will get an error.
SELECT
'X' AS NPI
INTO #NPI
SELECT
*
FROM #NPI NPI
WHERE
NPI.NPI IS NOT NULL
It even happens without a temp table:
SELECT
*
FROM msdb.dbo.backupfile NPI
WHERE
NPI.backed_up_page_count IS NOT NULL;
I'm not sure why it thinks that the NPI. in the query refers to a DB instead of to the alias, but it is annoying.
Say that the server you are working on has a DB named NPI, but you don't have access to it. When you paste this code in to SSMS you will get an error.
It even happens without a temp table:
I'm not sure why it thinks that the NPI. in the query refers to a DB instead of to the alias, but it is annoying.