Tag Archives: T-SQL
-
sp_SrvPermissions
Leave a commentAugust 19, 2013 by Kenneth Fisher
Last week I posted my stored procedure for database permissions, sp_DBPermissions. A couple of days later I was demonstrating it …
Continue reading -
How are COALESCE and ISNULL different?
6August 7, 2013 by Kenneth Fisher
At first glance these two functions seem very similar, and superficially they are. For example COALESCE(fieldname1, fieldname2) and ISNULL(fieldname1, fieldname2) …
Continue reading -
Database Permissions Queries
3August 5, 2013 by Kenneth Fisher
Over the last year of blogging my thoughts and queries I’ve discovered something interesting. I posted Where is my Backup? …
Continue reading -
Generic Dynamic SQL Stored Procedure
5July 22, 2013 by Kenneth Fisher
Recently I came across a post on http://www.StackOverflow.com that basically asked how to write a generic stored procedure to handle …
Continue reading -
Scripting a partitioned table or index, a caution.
14July 15, 2013 by Kenneth Fisher
I was researching a problem with a partitioned table that had somehow become unpartitioned and discovered something rather interesting. First …
Continue reading -
Writing Dynamic SQL (A how to)
6July 1, 2013 by Kenneth Fisher
A little while back I wrote Best practice recommendations for writing Dynamic SQL where I made a number of suggestions …
Continue reading -
Using OUTPUT to back up a change
2June 26, 2013 by Kenneth Fisher
How will you back out if your change doesn’t work?! Always take a backup! There should always be a back …
Continue reading -
Metadata Functions (OBJECT_NAME for example)
Leave a commentJune 24, 2013 by Kenneth Fisher
What is a metadata function? According to BOL a metadata function is one that returns data about the database or …
Continue reading -
ORDER BY the numbers
17June 17, 2013 by Kenneth Fisher
Have you ever needed to order by a calculated column? You might have written it something like this: Did you …
Continue reading -
Best practice recommendations for writing Dynamic SQL
16June 12, 2013 by Kenneth Fisher
Note this is not “Best Practices when USING Dynamic SQL”. These are just good habits I’ve come up with over …
Continue reading





