0

I am using the cbp with mysql command as below. I am facing issue in my for back slash \ and forwas slash / and special characters ä , within the string which | pipe separated.

sample file: |KMADRZYK|MANUAL W|SAKM18OCT19|S|158 \serv\Finance\Finance\AP_PROCESSING\1_asN|SAR|a_OU|30NET|

code:

    SET @Command = 'freebcp db.dbo.table in "\\server\Import\' + @FileName
        + '" -S OAKSQL21 -c -T -t "|" -r "\\r\\n" -e "\\server\import\LoadError\' + @FileName + '-' + @FileDateTime
        + '.err" -m 1000'
    EXEC master.dbo.xp_cmdshell @Command

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.