I suggest you ...

Allow suppression of a specific Warning on a specific object in a Database Project

I have a few stored procedures in my database project that reference local temporary tables created in another stored procedure. The procedures throw SQL71502 Warnings, that tell me the procedure has an unresolved reference to the temporary table. There is no way to resolve these Warnings within the Database Project, since there is no way for the Database Project to "see" the temporary table created in the other procedure. Therefore, the only choices I have are (1) keep the Warnings in the solution or (2) suppress all Warnings of type SQL71502 in the project. Neither approach is optimal. Keeping these Warnings just creates noise in the development environment, while suppressing ALL Warnings of this type might lead me to miss an unresolved reference that CAN be resolved. I would like to see a feature that would allow me to suppress a specific Warning on a specific object. This way I can remove the Warning from the development environment without having to suppress all Warnings of that type.

19 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Eric MametEric Mamet commented  ·   ·  Flag as inappropriate

        I think you could also suppress the warning message by fooling SSDT.
        In your stored procedure, add a piece of code like this

        IF 1 = 2 CREATE TABLE #YourTable(blah blah blah)

        This seems to do the trick for me with SSDT 2013

        Eric Mamet

      • Anonymous commented  ·   ·  Flag as inappropriate

        Ah, that's perfect! This should be publicized a little more. I've been working with the database projects for years and didn't know that the warnings could be suppressed at the file level.

      • Gert DrapersGert Drapers commented  ·   ·  Flag as inappropriate

        You can supress TSQL warnings at the file level as well, look at the properties on the files "Suppress TSql Warnings", besides the project file. There is no object level suppression as there is no standard attribution construct in the TSQL language to achieve this. A XML comments like idea would come closed.

      Feedback and Knowledge Base