The Fake Logtable

This time just a short and easy one. Imagine you load FTP logs or any other kind of log file into a table.

For this purpose we introduce a fake ftp log like this:

DECLARE @LogFile TABLE (	
        id			INT IDENTITY PRIMARY KEY,
	TransactionId	INT NOT NULL,
	Operation		NVARCHAR(100) NOT NULL,
	[Filename]		NVARCHAR(250) NULL
);

INSERT INTO @LogFile 
VALUES 
	(1, 'connecting', NULL),
	(1, 'connection acqui
....

continue reading