September 23, 2001 at 12:00 am
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/sjones/scriptscheduling.asp
October 17, 2001 at 1:06 pm
Good article steve. Perhaps worth while mentioning how you can load up sql*server tables from the results of a external command being executed? I cant remember the exact syntax as its 2am and i had a screaming baby in my ear 🙂 but its a nice trick that i used when having to unzip a heap of files from a dir within t-sql.
Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
October 18, 2001 at 9:27 am
I avoid putting the actual SQL in the steps because it creates a point of maintenance. I'd rather create a stored proc and change that if needed.
ckempste:
Not sure what you mean? Is this a BULK INSERT variation?
Steve Jones
November 25, 2001 at 5:10 pm
Steve
Hi Steve, I ment something like this:
truncate table infile_list
set @v_commandline = 'dir /B ' + @v_processeddest + '*.unl'
insert into infile_list
exec @result = master..xp_cmdshell @v_commandline
Where ive sent the output of the xp_cmdshell to a table for later processing.
Cheers
Chris
Chris Kempster
www.chriskempster.com
Author of "SQL Server Backup, Recovery & Troubleshooting"
Author of "SQL Server 2k for the Oracle DBA"
November 26, 2001 at 8:41 am
That makes sense. I usually pipe to a file and then grep or findstr for any errors.
Steve Jones
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply