• the issue is subtle: you need to use dbl quotes, and not two single quotes, to identify teh field and row delimiters:

    -t''|'' -r''\n''

    --should be

    -t"|" -r"\n"

    Declare @sql varchar(8000),@IncomingPath varchar(500),@FileName varchar(500)

    set @FileName='12272012_114537_AB123.txt'

    set @IncomingPath='e:\feeds\HH_feeds\procen\incoming\'

    SET @sql = 'bcp [dbo].ABt_file_load_2012 in '''+@IncomingPath+ @FileName+''' -t"|" -r"\n" -F 2 -e'+@IncomingPath+'ErrorLog\'+ @FileName+'.ERR -T -S ' + @@SERVERNAME

    print @sql

    EXEC (@sql)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!