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 2005 Forums
 Transact-SQL (2005)
 Extract from a table

Author  Topic 

GhantaBro
Posting Yak Master

215 Posts

Posted - 2008-11-10 : 07:33:13
Hey guys,

In one of the SPs I created, creates a staging table and then a file is extracted using BCP Out. Requirement is changed now and they want me to extract different files (not 1 whole file) based on values in a field... Guys, can you please tell me the best way to do this... any sample script would be very helpful.

Thanks in advance!!!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-10 : 07:36:41
use OPENROWSET
http://msdn.microsoft.com/en-us/library/ms190312.aspx
Go to Top of Page

GhantaBro
Posting Yak Master

215 Posts

Posted - 2008-11-10 : 10:40:22
so can it be done using while loop instead of cursor?
Go to Top of Page
   

- Advertisement -