Category: SQL

June 9, 2010

Last night I was trying to cleanup the spammers from the database of devpinoy.org and while I was evaluating the result sets i was able to conclude that aside from using common spam text like ‘cheap’, ‘buy’, ‘free’, ‘deal’, ‘viagra’, ‘prozac’ that 30% of the false emails that spam accounts are using multiple dots on […]

Continue Reading
August 19, 2008

One of the common problems that you would encounter when you are building applications that utilize views is that sometimes there are cases wherein a view gets out of date. This happens when you add a new column to a table a view is refrencing. To fix this some people would delete the view and […]

Continue Reading
August 19, 2008

I’ve been doing a  lot of code deployments lately and I’ve come across several occasions wherein my stored procedures wouldn’t run as fast as expected compared to it’s previously known execution time. The problem lies on the statistics not getting updated after change has been made against an index or other object that may affect efficiency. […]

Continue Reading
July 24, 2008

Here’s an update to my blog entry 3 years ago regarding the same topic:

And here’s the result for the query above

I’m hoping that I could update this regularly. Did I miss anything? Post it on the comments and lets start an archive of useful sql date scripts.

Continue Reading
December 11, 2007

I wrote an article a few years ago using SQL SMO and just realized today that I can also list SQL Severs without importing an additional assembly to my project(Microsoft.SqlServer.Management.Smo) by using the SqlDataSourceEnumerator class. SqlDataSourceEnumerator is a class that provides a mechanism for enumerating all intances of SQL Server in a given network. SqlDataSourceEnumerator […]

Continue Reading