CREATE TABLE dbo._cc_tmp (
text varchar(8000)
)
GO
CREATE PROCEDURE dbo.cc_PrintFile
@filename varchar(255)
AS
BEGIN
DECLARE @cmd varchar(200)
TRUNCATE TABLE dbo._cc_tmp
SET @cmd = '
BULK INSERT dbo._cc_tmp
FROM ''' + @filename + '''
WITH (
FIELDTERMINATOR = ''|''
)'
EXEC (@cmd)
SELECT text 'line' FROM dbo._cc_tmp
END
GO