hey yea it does work when i exec it, thanks,
im getting a bit more greedy now and would like to export more tables, with possible a break between data from each table.
excluding the break line of code, i've entered the following:
Exec IMPEXPFROMDB 'Voucher','Users','Userpoints','OUT','C:\testzz.txt'
I have changed my bcp command to:
set @cmd = 'bcp '+@dbname+'..'+@tablename1+' '+@dbname+'..'+@tablename2+' '+@dbname+'..'+@tablename3+' '+@direction+' '+@filepath+' -c -T'
i get the error: "Please enter the Direction(In/Out)"
i tried to place the out and file path after each table and duly change the bcp command but i get the error : "too many parameters entered"
any ideas, thanks