Mladen Prajdić Blog

Blog about stuff and things and stuff. Mostly about SQL server and .Net

C# 2.0 ?? Operator

I saw this operator in use today in a code example. I must say when I figured what it does my geek side went "YES!!!!". It resembles an old "if" abbreviation: (condition ? Read more →

SQL Server IsGuid() function

A simple function that checks if a passed string is a GUID. create function IsGuid ( @testString varchar(38)) returns int as begin declare @ret int select @ret = 0, @testString = replace(replace(@testString, '{', ''), '}', '') if len(isnull(@testString, '')) = 36 and @testString NOT LIKE '%[^0-9A-Fa-f-]%' and -- check for proper positions of hyphens (-) charindex('-', @testString) = 9 and charindex('-', @testString, 10) = 14 and charindex('-', @testString, 15) = 19 and charindex('-', @testString, 20) = 24 and charindex('-', @testString, 25) = 0 set @ret = 1 return @ret end go select dbo. Read more →

a select trigger…

this is a select trigger on a table. found this in a blog of our first Slovenian Sql Server MVP (i think he's first :))). http://solidqualitylearning.com/blogs/dejan/archive/2004/11/25/214.aspx quite interesting... Legacy Comments Tara 2005-08-08 re: a select trigger. Read more →

Transpose data

There were some quetions in the forums about transposing data without the use of aggregate functions. While building a CSV list is nice sometime that's not what we want. So this is a sproc that does just that. Read more →

Nunit asp testing

Well we decided we should do some unit testing on our asp.net project. We used NUnit.Asp. i must say the thing works realy great. the whole thing is based on xml document model of the page. Read more →

spyware

well at one point in time we all went through the unwelcomed experience of removing spyware from our computers... usually i use SpyBot or Spy Sweeper. But i got a nasty bug neither of them would remove. Read more →

ISNULL vs COALESCE speed test

well there was once a debate on SqlTeam in which i claimed that IsNull is slower than Coalesce when used in same fashion: IsNull (col1, 'somevalue') vs Coalesce(col1, 'somevalue') so i did a little testing. Read more →

First time

hello all. my very first blog post. UAU!! i'm so proud of my self :) well thanx to graz for setting it up. i'm going to post something constructive in few days. Read more →