Multi-Row Variable Assignment and ORDER BYCommented on: 5 years ago
(February 4, 2010)
These lists are often for a child table, where the covering index is likely to be on the foreign key from the parent table, plus the key for the child entity. But it's good to know that these bloody-...
T-SQL Challenge – Efficient Partitioned TOPCommented on: 6 years ago
(October 2, 2009)
With a smaller number of rows, the CTE solution seems more efficient than this time-proven GROUP BY syntax. Putting the two queries in a batch, the CTE takes up around 36%.
select t1.grp, t1.col1,...
Catch That Bug! Random Row per GroupCommented on: 9 years ago
(October 20, 2006)
In order for the subquery to pick a random entry, you need to drop the ORDER BY clause, rather than using one.
Not sure why not all EmployeeId-s are returned, but this behaviour may already...
Digital Magazine Archives
Browse back issues of SQL Server Pro, from January 2007 through the last issue published in April 2014. Find the back issues here.
Melissa Data's Data Quality Analyst Joseph Vertido explains how Gartner defines the critical data quality steps to prevent bad data from entering your systems in the first place, and then keep it clean over time....More
I’ll sound a bit like Captain Obvious for bringing this up, but it’s important to remember that security encompasses a lot more than protecting sensitive data from the specter of outsider threats like hackers. Properly implemented security policies also account for threat-models that include insiders – or people within your organization....More
There’s simply no way to overstate the importance of regular Transaction Log Backups. Not only do they help protect from disaster, but regular execution of T-Log backups on Full (and Bulk-Logged) Recovery databases helps keep thing “fit and trim”. Most of the time, setting up a Notification for when T-Log Backup Jobs fail is enough to let you know when something goes wrong....More