• Hi Diana,

    I cheked your script on my local environment and it worked absolutely fine.

    Now few things i have in my mind.

    Check the userid and password for your DB in the SQL query for BCP.

    another thing are you running this script on remote server or your local server?

    please check these and then let me know..

    Regards

    Samar