# Database Discussions > Microsoft SQL Server 2008 >  bcp copy using special characters

## deepesh87

I am doing bcp export from sql server table to text file. But I am facing problem.Data in table contains special characters sucha as tab, spaces. So when I am exporting the data to text file, it generates extra space or tab in output. So is there any way so that I can eliminate the space or tab in sql server table during bul copy. Can anyone help me?

----------


## skhanal

Instead of exporting table you can export result of a query. The query can use RTRIM on columns with blank spaces so that it does not appear in the export file.

----------


## deepesh87

> Instead of exporting table you can export result of a query. The query can use RTRIM on columns with blank spaces so that it does not appear in the export file.


Thank you. But is there any way to detect too many tabs in bcp export.

----------

