Monthly Archives: August 2008

ofdb_title_proper(s)

Public Function ofdb_title_proper(s)    With New RegExp        .Pattern = "^(.*)(, )(Der|Die|Eine|Ein|Les|La|The|A)(.*)$"        ofdb_title_proper = .Replace(s, "$3 $1$4")    End WithEnd Function

Posted in Code Snippets | Leave a comment

Example for dynamic pivot table (crosstab) in SQL Server 2005

— traffic distribution by devip and protocoldeclare @list varchar(max) — select distinct protocol from #1 order by 1 SELECT @list = COALESCE(@list + ‘,[‘, ‘[‘) + CAST(protocol AS varchar(4)) + ‘]’ FROM (select distinct top 100 protocol from #1 order … Continue reading

Posted in SQL Server 2005 | Leave a comment