Posted in Programming, SQL Server on February 25th, 2009 No Comments »
I was looking for a way to find the first occurrence of 4 digit
year in a column containing free from text. The first thing I think of was to use regular expression. I did some research and came up with the following function. Once the function is created it can be used like […]
Posted in Programming, SQL Server on February 25th, 2009 No Comments »
A query to display all user tables in a database and sort them by decending order according to row counts is very useful when it comes to research and
discover where data are stored in a complex database. I found such query very helpful from time to time. I have collected a few of them […]
Posted in MySQL, SQL Server on February 23rd, 2009 4 Comments »
I found a lot of posts on the internet regarding how to set up a MSSQL link server to MySQL server. I didn’t find any of them gave a complete picture. So I wrote my own post and hope it can help.
The first thing need to do
when setting up a link server to […]
Posted in SQL Server on February 4th, 2009 No Comments »
I was told by various documentations and technical articles that SQL Server Query Optimizer does a good job on selecting which index to use when establishing a query execution plan. And it is in rare cases that you will find justification to use index hint. I believe I encountered this kind of rare cases a […]
Posted in SQL Server on January 21st, 2009 9 Comments »
The other day I was asked to provide a list of database server and all the databases on them with the disk space each database used. I was looking for an easy way to do this instead of opening up the property page of each database in management studio and looking at the size. First […]