• SQL error in SSMS

    Author
    Topic
    #491431

    I recently began working with a new database on SQL Server 2008 R2. I see some usual behavior and would appreciate any thought anyone has.

    As one of my first tasks, I created a View to be referenced from another Query I am writing. The view appears to have been created correctly, as it is listed in the Object Explorer. Running the View from the Management Studio interface returns the expected results. However, when I attempt to to reference the View from another query, the View name does not appear as an object in the drop-down list when typing in the IDE window, and the view name and all referenced columns are highlighted as in error (red squiggly underline). Even so, with I run the query, it runs as expected and returns the proper results. Therefore, the query appears to have been written correctly, but the IDE is showing it as in error. Can anyone explain this?

    Randy Davis

    Viewing 1 reply thread
    Author
    Replies
    • #1416737

      That does seem odd – I don’t seem to be able to duplicate that situation in SQL Server 2012. Let me see if I can locate a 2008 R2 installation and test it again.

    • #1416754

      I saw it happen rather frequently on SQL Server 2k8 R2. Since I upgraded to 2012, it stopped happening, so I think that was something Microsoft fixed.

    Viewing 1 reply thread
    Reply To: SQL error in SSMS

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: