I'm trying to use sp_msforeachtable and bcp to export all tables in a database. The problem I have is that some of the tables have space in their names.
For any tables which have space in their names, using sp_msforeachtable and bcp will yield the error "Copy direction must be either 'in', 'out' or 'format'." I have no problem using sp_msforeachtable and bcp to export individual table which has space in its names so the problem is how to export all tables using the ?.