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 2000 Forums
 SQL Server Development (2000)
 running host o/s commands from within query analyser

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-23 : 14:46:25
Haywire writes "I am attempting to run o/s commands from within query analyser
then from within stored procedures.
the way I currently do it (from within Oracle) is
declare
V_pickup_day date;
V_output_day varchar2(10);
begin
V_pickup_day := sysdate-1; --yesterday
V_output_day := to_char(V_pickup_day,'DDMMYY')||'.n01';
host 'copy p:\data\'||V_output_day||' '||'c:\'V_output_day;
end;
could you tell me the MS equivalent
Thanks

o/s = windows 2000 advanced server
dbms = sql server 2000 standard
both unpatched"
   

- Advertisement -