August 29, 2006 at 11:35 pm
Does anyone know of an SQL Server 2000 equivalent of the Oracle SPOOL command, i.e. SPOOL C:\TEMP\MyFile.txt which can be placed at the top of any sequence of SQL commands and directs system messages to the nominated file ?
September 1, 2006 at 8:00 am
This was removed by the editor as SPAM
September 2, 2006 at 10:40 pm
There's several ways to do this... here's one if you have SA privs... there are other methods if this one doesn't suit ya... let us know...
DECLARE @Cmd VARCHAR(8000)
SET @Cmd = '@Echo ' + somechardata + ' >> ' + somefilename
EXEC Master.dbo.xp_CmdShell @Cmd
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply