• I tried this but the table is not exporting in txt file:

    [SQL] DECLARE

    @SQL VARCHAR (8000) SELECT

    @SQL = 'bcp mytable out \\XX.XX.XX.XX\output.txt -T -c -t'

    Affected rows: 0

    Time: 0.041ms

    Affected rows: 0