Shame that the docs for anything older than SQL Server 7. Although actually it looks as though the SQL Server 7. The SET operation bit wasn't added until Show 4 more comments. Jack Douglas Jack Douglas Is that called the 'aggregation part'? It's the aggregate function : I believe the error is referring to MAX. I think you second example has to do more with order of operations using window functions. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 4. Related 2. Hot Network Questions. She primarily focuses on the database domain, helping clients build short and long term multi-channel campaigns to drive leads for their sales pipeline.
Is your SQL Server running slow and you want to speed it up without sharing server credentials? In my Comprehensive Database Performance Health Check , we can work together remotely and resolve your biggest performance troublemakers in less than 4 hours.
Once you learn my business secrets, you will fix the majority of problems in the future. SQL Error Messages. Leave new chronologic. Jeff Moden. Leave a Reply Cancel reply. Exclusive Newsletter Website.
Go to mobile version. Viewed k times. I'm getting the same warning. I don't mind the warning in and of itself, but, I need the stored procedure to be run by the SQL Agent, and when I do that, the warning causes the Agent job to fail. It will appear in the output visible in the job history, which you may be looking at when the job fails for some other reason so assume is the cause — Martin Smith.
Add a comment. Active Oldest Votes. Mostly you should do nothing about it. In some limited cases you can rewrite the aggregate to avoid it.
Apart from adding unwanted noise to the messages stream it has no ill effects other than meaning that SQL Server can't just bypass reading NULL rows, which can have an overhead but disabling the warning doesn't give better execution plans in this respect The reason for returning this message is that throughout most operations in SQL nulls propagate.
Image Source , Creative Commons image altered cropped and annotated by me After the third cake was weighed the scales broke and so no information is available about the fourth but it was still possible to measure the circumference.
Martin Smith Martin Smith k 81 81 gold badges silver badges bronze badges. This properly explains the issue and allows me to happily continue ignoring the warning as that is exactly what I expected to happen.
Even though I've been irritated at null propagation on multiple occasions I guess I never really questioned the reasoning behind it. Any answer that can make me go "oohhhhh" or involves biscuits has got my vote. I've probably googled this error a couple of times, but this was by far the best explanation of the issue, as well as why its there, and when it matters. Thank you! Great explanation! This explain the "eliminated by an aggregate function", but doesn't explain the "other SET function".
Do you know what does it mean? Show 1 more comment. Chris Walsh Chris Walsh 3, 1 1 gold badge 38 38 silver badges 58 58 bronze badges.
Your option 1 has other side effects. Your option 3 only works if that's the single aggregated column.
0コメント