sql server invalid object name - but tables are listed in SSMS tables list
Ctrl + Shift + R refreshes intellisense in management studio 2008 as well.
Make sure that the selected DB is the one where the table is. I was running the Script on Master
. In my case, I had to switch to hr_db
.
Rookie mistake but, could help someone.
Try:
Edit -> IntelliSense -> Refresh Local Cache
This should refresh the data cached by Intellisense to provide typeahead support and pre-execution error detection.
NOTE: Your cursor must be in the query editor for the IntelliSense menu to be visible.