Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 using bcp for export query result to dbf file

Author  Topic 

lilinikco
Starting Member

28 Posts

Posted - 2011-09-17 : 08:48:10
hi all.
I use this code for export query result to xls file:
bcp "use MaliGilan0622; select * from test" queryout "c:\test.xls" -U sa -P pass -c -C RAW -k -E

and this work fine.but I want to export query result to dbf file with bcp.what do I change to this code for my goal?I use this code too:
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'dBase IV;Database=C:\Temp;','select * from test1) select * from test
but nvarchar fields show with ??? what do i do? please guide me.i search google very much but i don't find any thing.


lili@@

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-17 : 13:07:13
we had a similar requirement but we made use of SSIS package for achieving this.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -