I use SQL Server 2016 Developer Edition on Windows 10 64 bit. All the databases are local on my laptop.
I have a SQL script file, and Intellisense doesn't work on it. I have enabled Intellisense and tried various fixes suggested in this post:
IntelliSense not working but it is enabled
None of these fixes work for me; however, Intellisense works on all the other files. The only special thing of this file is its length: it has more than 600 lines of code.
It seems that the problem is caused by a command creating columnstore index. Here is a sample code:
SELECT TOP 100 *
INTO #test1
FROM tab1
CREATE CLUSTERED COLUMNSTORE INDEX idx ON #test1
SELECT TOP 100 *
INTO #test2
FROM tab1
I found that Intellisense stopped working after inserting the block of code in the middle! The outlining will also disappear after inserting the middle block of code.
Once I remove the middle block of code, the outlining and Intellisense will work again.
Can anyone help me test this sample case?
--
I tried to add semicolon an GO to separate code, but neither of them works for me. Now it seems that the only feasible solution is commenting that middle block out.