1/30/2024 0 Comments Postgresql insert into viewExpand the Intellisense options and select Refresh Local Cache as shown below:Īs soon as we refresh the cache, metadata is up-to-date (sometimes it takes a couple of seconds), and Intellisense removes the red squiggles line. An easy way to fix this, although it’s not an actual error (the above script can be executed without throwing an error), is to refresh the IntelliSense’s cache manually. Right after the creation of an object, when queried, it’s very likely for the view as the source to be underlined in red until the cache is refreshed. The same would have happened to the CREATE VIEW SQL statement. We just changed the name of the view and the metadata has not been updated yet. This indicates an error in SSMS, in this particular case about an invalid object name, but it’s not: I can’t help but notice the name of the view underlined in red. We could have just dropped the view and use the CREATE VIEW SQL statement to re-create it with the new definition, but we can’t break script and dependencies with this simple view, so it’s safe to just rename it using the stored procedure. The example below changes the database context to the SQLShackDB database and changes the view’s name: Make sure that you’re are connected to the SQLShackDB database or specify the database name in the USE statement to avoid getting errors from SQL Server. This is a series about using T-SQL, so we’re going to do it using the stored procedure mentioned above.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |