0
Started

Simple SQL statement in table PostScript throws warning

David Moutray 6 months ago updated by hannah gryska 6 months ago 6

The following post script in a table generates two warnings when I attempt to merge back to Main:

DECLARE @LocalJob TINYINT;

INSERT SQLAgent.JobCategory
VALUES
( 1 ,@LocalJob ,'[Uncategorized (Local)]')
,( 2 ,@LocalJob ,'Data Collector');

...and here are the warning messages:

Image 2148

All of the above SQL is valid syntax.  I have tried varying the syntax extensively, but the warnings remain.  I have not tried to ignore the warnings and merge anyway because I do not want to ignore warnings.  If you get in the habit of ignoring warnings, then they tend to become meaningless noise over time.  So, I make it a habit to treat warnings as errors in any programming environment.

Additional note:  these warnings do not appear until I attempt to merge the branch.  I resolved all errors  given before I attempted the merge.

Ah, and I see that bugs are automatically updated to Private.  That explains the paucity of forum postings.  I am not sure this helps you.  Being able to search through problems encountered by other users on Stack Overflow or even Microsoft Connect is a big help when troubleshooting problems.  You do yourselves no favors by hiding these issues from the world.  Serious users will find them pretty quickly no matter what you do.  All it does is hinder power users from solving their own problems, thereby imposing a heavier burden on your tech support people.

Started

Thank you for contacting us, David. My name is Retinder, I am the Solutions Engineer assigned to your ticket. Thank you for your patience. In this time, I was able to replicate your issue and find the underlying reason as well. Here are my findings:

  • You’ve helped us uncover a bug
  • The post script warning during the merge should not appear - you are right
  • Important fact: the task is still completed properly, so the issue is simply around a misplaced warning
  • I have forwarded the details to our Dev team to investigate further of why this false warning is showing up and resolve this. They will need to investigate the issue and implement a solution with one of the next releases.

My current recommendation: While I 100% agree with you, ignoring the warning is in no way the best practice, my recommendation right now, given the circumstances, is to do just that - continue with the next steps disregarding the warning. I tested myself: after the merge, post script is still brought over, so functionally - you are not losing any performance. It is really just a false warning message. Thank you so much for reporting and we will need to fix this for future cases, so that other users do not experience the same. If you have any questions or concerns while our team works on this bug please feel free to reach out. We will keep you up to date with the progress. PS I went ahead moved your ticket from public to private status since you are sharing a DDL in it and for security protocols, we do not want your DDL being shared in public. If you prefer, I can move the ticket back to the public.

Thanks,
Retinder Labana

You may move it back to public.  This is a test sample I created based on a set of system stored procedures from Microsoft SQL.  It is not code that we use anywhere in our system.

Hi David,

As per your request, I have moved the ticket to public. 

Thanks, 
Retinder Labana