Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2010
    Location
    Denver, CO
    Posts
    185
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL error in SSMS

    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

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,483
    Thanks
    3
    Thanked 41 Times in 41 Posts
    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.
    Wendell

  4. #3
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    10,135
    Thanks
    129
    Thanked 1,133 Times in 1,045 Posts
    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.
    Rui
    -------
    R4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •