Hi and welcome to my blog. Im Tasos, a software engineer working in the UK. This is where i share some of my findings related with SQL, c#, asp.net and javascript with you. I hope you find something helpful and Im looking forward to your feedback!

Recent Comments

Popular Posts

Recent Posts

Archives

Post Categories

Blog Stats

  • Posts: 15
  • Comments: 116
  • Trackbacks: 9
  • Articles: 1

SQL

Beyond SoundEx - Functions for Fuzzy Searching in MS SQL Server

posted @ Sunday, January 11, 2009 12:08 AM | Feedback (29), Filed Under SQL C# SQLCLR

In this post: SoundEx in Sql Server SimMetrics Adding string Metric functions in MS Sql Server Evaluating metric accuracy and comparing Metrics Conclusion + code Quite often we come across a requirement where we may need to perform some sort of fuzzy string grouping or data correlation. For example, we may want to correlate the customer records of a database by identifying records that are similar but not necessarily exactly the same (due to spelling mistakes for example). Obviously a simple group by, will not successfully group such data. We will need to employ what...

SQL Server script to auto-create indexes on all Foreign Key Columns

posted @ Tuesday, July 29, 2008 11:38 PM | Feedback (2), Filed Under SQL

If you want a quick way to set some default indexes up in your database the best candidates for your indexes would be the foreign keys. They are usually highly selective and many of our queries tend to have some sort of filter on the foreign keys, this makes them good candidates for an index. You may be quick to think: 'but sql server has indexes on the foreign keys' That's not true, since a foreign key is an integrity constraint while an index is for performance. Have a look at an interesting discussion over at sqlblog about this: http://sqlblog.com/blogs/greg_low/archive/2008/07/29/indexing-foreign-keys-should-sql-server-do-that-automatically.aspx   The following...

SQL CLR without DLL dependency for your production server

posted @ Thursday, July 17, 2008 8:32 PM | Feedback (7), Filed Under SQL SQLCLR

Have you been shying out of putting extra functions on your SQL Server 2005 using SQL CLR simply because you would like to avoid DLL Hell?! Well, the good news is that you need not be so worried, since SQL Server does not link to the dll itself, but instead it embeds the assembly in the database. What's even better is that you can deploy your assembly by simply scripting it. Lets do this with an example, in the previous post there is a sample that shows how to create support for regular expressions using SQL CLR....

How to Script the data of an SQL table using a Stored proc

posted @ Wednesday, April 25, 2007 10:40 PM | Feedback (12), Filed Under SQL

The Problem: I find myself quite often in the following situation: I add a couple of tables in a development database, add some data in that table and then I need to script the changes and apply them to the staging and then to the production db. If you dont create everything by script SQL Server Management Studio can script the Create Table for us, but there is no way to script the data! For this reason I created a stored procedure, which yeah you guessed it, creates all the INSERT statements containing the data of the table. The Solution: The following...