-- Collection of code snippets by Arne Vajhøj 
-- posted to eksperten.dk, usenet and other places (2002-now) 
CREATE ASSEMBLY MySP1 FROM 'C:\Work\clrsp\MySP1.dll' WITH PERMISSION_SET = SAFE;
GO
CREATE PROCEDURE MySP
AS
EXTERNAL NAME MySP1.[SQLSrvLib.MySP1].MySP;
GO
CREATE TABLE split (
    nummer INTEGER,
    navn VARCHAR(10),
    dato VARCHAR(32),
    PRIMARY KEY(nummer)
)
GO
INSERT INTO split VALUES(1, 'Hans', 'RH 100521 - 120521')
INSERT INTO split VALUES(2, 'Per', 'RH 100521 - 120521')
INSERT INTO split VALUES(3, 'Hans', 'RO 100521')
INSERT INTO split VALUES(4, 'Pia', 'SLA 100520 - 120520')
GO
SELECT * FROM split
GO
EXEC MySP
GO
DROP TABLE split
GO
DROP PROCEDURE MySP
GO
DROP ASSEMBLY MySP1
GO
