Tuesday, July 7, 2015

Strange SQL Problem

I have a Select Statement that returns 4 rows.  When used in a stored procedure as input to an Insert Into, though, it was returning five rows.   I commented out SET NOCOUNT ON; which is added by the SQL 2014 template.  It then returned 4 rows.  To test that was what was really going on, I uncommented out SET NOCOUNT ON; and it is now returning 4 rows properly.

I made no other changes.

Anybody else ever run into anything like this??

No comments:

Creative Commons License
Oustside The Asylum by Ted Seeber is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
Based on a work at http://outsidetheaustisticasylum.blogspot.com.