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 2008 Forums
 Transact-SQL (2008)
 how to run a batch file of sql queries

Author  Topic 

Z.K.
Starting Member

5 Posts

Posted - 2009-10-16 : 06:56:13
I was wondering if it is possible with SQL Express to run a batch of queries somehow. I have about ten related sql query files and it would be nice to just run one file and have all the queries execute.

Z.K.

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-10-16 : 07:01:03
You can use SQLCMD in a batch file. Here's the BOL link for SQL Express:
http://msdn.microsoft.com/en-us/library/ms165702.aspx
Go to Top of Page

Z.K.
Starting Member

5 Posts

Posted - 2009-10-17 : 19:00:18
quote:
Originally posted by YellowBug

You can use SQLCMD in a batch file. Here's the BOL link for SQL Express:
http://msdn.microsoft.com/en-us/library/ms165702.aspx



Z.K.
Go to Top of Page

Z.K.
Starting Member

5 Posts

Posted - 2009-10-17 : 19:02:09
quote:
Originally posted by YellowBug

You can use SQLCMD in a batch file. Here's the BOL link for SQL Express:
http://msdn.microsoft.com/en-us/library/ms165702.aspx



Thanks, I forgot about sqlcmd.

Z.K.
Go to Top of Page
   

- Advertisement -