Platinum Sponsor
peso.jpg

Peter Larsson

Peter Larsson is a key player for performance written code. He can turn a 10 hour query into a 3 minute piece of code. Peter is also a SQL Server MVP since 2009. He often hangs out at SQLTeam.com (27k+ posts) and other various sites where he helps all people understand SQL Server. When not working, he takes care of a wife and 4 kids.
http://www.developerworkshop.net http://weblogs.sqlteam.com/peterl/rss.aspx

Sessions

All developers and DBAs make mistakes when programming in SQL Server. Learn to avoid the most common mistakes.

Blog posts RSS

New Article series 24 Feb 2012
I have started a new article series at Simple Talk. It's all about the transition from procedural programming to declarative programming. http://www.simple-talk.com/sql/   First article is found ...

How to calculate the covariance in T-SQL 18 Jan 2012
DECLARE @Sample TABLE         (             x INT NOT NULL,             y INT NOT NULL         ) INSERT  @Sample VALUES  (3, 9),         (2, 7),         (4, 12),         (5, 15),         (6, 17) ;WITH cteSource(x, xAvg, y, yAvg, n) AS (         SELECT  1E * ...

Avoid stupid mistakes 22 Sep 2011
Today I had the opportunity to debug a system with a client. I have to confess it took a while to figure out the bug, but here it is SELECT COUNT(*) OfflineData Do you see the bug? Yes, there should be a FROM clause before the table name. Without the from clause, SQL Server treats the ...

Convert UTF-8 string to ANSI 14 Sep 2011
CREATE FUNCTION dbo.fnConvertUtf8Ansi (     @Source VARCHAR(MAX) ) RETURNS VARCHAR(MAX) AS BEGIN     DECLARE @Value SMALLINT = 160,             @Utf8 CHAR(2),             @Ansi CHAR(1)     IF @Source NOT LIKE '%[ÂÃ]%'         RETURN  @Source     WHILE @Value <= 255         ...

Do people want help? I mean, real help? 24 Jul 2011
Or do they just want to continue with their old habits? The reason for this blog post is that I the last week have tried to help people on several forums. Most of them just want to know how to solve their current problem and there is no harm in that. But when I recognize the same poster ...