I prefer |~|CREATE TABLE myTable99 (Col1 char(1), Col2 int, Col3 datetime)GOINSERT INTO myTable99(Col1,Col2,Col3)SELECT 'a',1, GetDate() UNION ALLSELECT 'b',2, GetDate() UNION ALLSELECT 'c',3, GetDate()GOSELECT * FROM myTable99DECLARE @cmd varchar(8000), @hostname varchar(256)SET @cmd = 'bcp ' + db_name() + '.dbo.myTable99 out d:\mytable99.txt -T -S'+@@SERVERNAME+' -c -t"|~|"'PRINT @cmdexec master..xp_cmdshell @cmd-- Make a share on your local machine and call it public and allow full accessSELECT @hostname = hostname from master.dbo.sysprocesses where spid = @@SPIDSET @cmd = 'Copy d:\mytable99.txt \\'+RTRIM(@hostname)+'\Public\*.*'PRINT @cmdexec master..xp_cmdshell @cmdGODROP TABLE myTable99GO
Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam