May 24
Integration services:
You may receive an error like the following:
MSP Error: 29513 SQL Server Setup Failed to compile the Managed Object Format (MOF) file C:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof
The file may exist as sqlmgmprovider.mof, which is a former version created for a former version of the OS (example: you had Windows 2000 Server installed and then upgraded to Windows Server 2003).
The workaround suggested by Microsoft did not work for me. So I simply renamed the file sqlmgmprovider.mof to sqlmgmproviderxpsp2up.mof which let me install the SP2 of Integration Services.
Database Engine:
A variety of issues, just look at the discussion with 136 replies regarding MSI installer files issues. For the relatively benign
Error 29528. The setup has encountered an unexpected error while Setting Internal Properties.
this easy fix did it for me: http://support.microsoft.com/kb/925976
Just throw away the quoted keys and they will be re-created by the subsequent installation of the service pack, which will hopefully be successful.
It seems SP 2 was rushed out the door, as this insider post confirms, so it might be good advice to wait for SP 3.

May 07
Transact-SQL doesn’t have arrays or nifty string functions like the C# System.String.Split () or java’s String.split() returning arrays in one swoop. Then again, SQL knows the SELECT … IN statement like
SELECT * FROM table1 WHERE id in (1,2,3,526)
so why no looping through comma-delimited strings?
A “Table-valued User-defined Function” returning a table variable is a handy and versatile workaround letting you query and loop through the values with near array-like ease.
The code could look like this:
CREATE FUNCTION [dbo].[StringToTable]
(
@inputString nvarchar(max),
@separator char (1)
)
RETURNS @ResultTable TABLE ( [String] nvarchar(max) )
AS
BEGIN
DECLARE @stringToInsert nvarchar (max)
WHILE LEN(@inputString) > 0
BEGIN
SET @StringToInsert = LEFT(
@inputString,
ISNULL(NULLIF(CHARINDEX(@separator, @inputString) - 1, -1),
LEN(@inputString)
)
)
SET @InputString = SUBSTRING(@InputString,
ISNULL
(NULLIF
(CHARINDEX(@separator, @InputString),
0),
LEN(@InputString)) + 1,
LEN(@InputString))
INSERT INTO @ResultTable
(
[String]
)
VALUES
(
@StringToInsert
)
END
RETURN
END
Again, the Transact-SQL string functions seem clumsy and inadequate compared with high-level languages. Short of using CLR functions in the database table-valued functions can put custom string operations at your immediate disposal.

Recent Comments