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)
 calling sql script from BAT file

Author  Topic 

aquarius1984
Starting Member

5 Posts

Posted - 2007-06-22 : 07:58:51
I want to run few sql(ms sql 2000) queries in query analyzer by just running a batch file.
Like for example
drop table sbcsadmin.player;
drop table sbcsadmin.team_manager;

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-22 : 08:19:19
use osql command line util to do it. Refer to books online for more information


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

aquarius1984
Starting Member

5 Posts

Posted - 2007-06-22 : 08:37:25
Thanks for reply
Which book to refer
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-22 : 08:40:47
Books OnLine is the SQL Server help file


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

aquarius1984
Starting Member

5 Posts

Posted - 2007-06-25 : 02:14:10
I am able to run osql from command prompt but dont know what to write in batch file.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-25 : 22:36:17
Just put whatever you run in dos command into batch file.
Go to Top of Page

aquarius1984
Starting Member

5 Posts

Posted - 2007-06-26 : 01:55:07
I got it, Thank you
Go to Top of Page
   

- Advertisement -