Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
ALTER PROCEDURE dbo.IMPORT_file (@DataFileName sysname ='C:\data.TXT' ) AS /* SET NOCOUNT ON */ DECLARE @SQLCommand VARCHAR ( 1012 ) SELECT @SQLCommand = 'Bulk INSERT tmptable FROM ''' + @DataFileName + ''' with ( FIELDTERMINATOR=''|'', ROWTERMINATOR = ''|\n'' ) ' PRINT @SQLCommand EXEC ( @SQLCommand ) RETURN