This was an extract using the command shell that extracted table data to a text file on the file system on the server.

 

/* AFS Feeds */

/* AFS Business Unit Feed – Command Shell */
EXEC xp_cmdshell ‘bcp “EXEC [<<Enter MAX DB Name Here>>].[dbo].[AFS_BUSUNIT]” queryout “D:\ExactShared\AFS_Xfer\busunit.txt” -T -c -t’

/* AFS Sales Rep – Command Shell */
EXEC xp_cmdshell ‘bcp “EXEC [<<Enter MAX DB Name Here>>].[dbo].[AFS_SalesRep]” queryout “D:\ExactShared\AFS_Xfer\salesrep.txt” -T -c -t’

/* AFS Customers – Command Shell */
EXEC xp_cmdshell ‘bcp “EXEC [<<Enter MAX DB Name Here>>].[dbo].[AFS_Customer]” queryout “D:\ExactShared\AFS_Xfer\customer.txt” -T -c -t’

/* AFS SKU – Command Shell */
EXEC xp_cmdshell ‘bcp “EXEC [<<Enter MAX DB Name Here>>].[dbo].[AFS_SKU]” queryout “D:\ExactShared\AFS_Xfer\sku.txt” -T -c -t’

/* AFS Price – Command Shell */
EXEC xp_cmdshell ‘bcp “EXEC [<<Enter MAX DB Name Here>>].[dbo].[AFS_Price]” queryout “D:\ExactShared\AFS_Xfer\sku.txt” -T -c -t’

/* AFS Ship To – Command Shell */
EXEC xp_cmdshell ‘bcp “EXEC [<<Enter MAX DB Name Here>>].[dbo].[AFS_ShipTo]” queryout “D:\ExactShared\AFS_Xfer\shipto.txt” -T -c -t’