By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,787 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

loading sql files from a master file Oracle equivalent

P: n/a
Hi.

I need to give my customer an sql file that they can run in query analyzer.
All the stuff they need to run is in a set of existing files.
I'd like to just tell them to load this file (this is oracle syntax):
@file1.sql
@file2.sql
@file3.sql
is there some way of calling these files (that are in the same dir) from a
master sql file?
Thanks
Jeff Kish
May 17 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jeff Kish (je*******@mro.com) writes:
I need to give my customer an sql file that they can run in query
analyzer. All the stuff they need to run is in a set of existing files.
I'd like to just tell them to load this file (this is oracle syntax):
@file1.sql
@file2.sql
@file3.sql
is there some way of calling these files (that are in the same dir) from a
master sql file?


In Query Analyzer, no. In the command-line tool OSQL, yes. But I would
prefer to run each script from a separate OSQL invocation, and but that
in a .Bat file.

When you invoke OSQL, be sure to use the -I option to turn on the setting
QUOTED_IDENTIFIER which is off by default with OSQL.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 19 '06 #2

P: n/a
On Fri, 19 May 2006 22:14:03 +0000 (UTC), Erland Sommarskog
<es****@sommarskog.se> wrote:
Jeff Kish (je*******@mro.com) writes:
I need to give my customer an sql file that they can run in query
analyzer. All the stuff they need to run is in a set of existing files.
I'd like to just tell them to load this file (this is oracle syntax):
@file1.sql
@file2.sql
@file3.sql
is there some way of calling these files (that are in the same dir) from a
master sql file?


In Query Analyzer, no. In the command-line tool OSQL, yes. But I would
prefer to run each script from a separate OSQL invocation, and but that
in a .Bat file.

When you invoke OSQL, be sure to use the -I option to turn on the setting
QUOTED_IDENTIFIER which is off by default with OSQL.

Thanks Erland. I was just having problems finding a definitive answer
for query analyzer. Too bad really, as my end users are more
familiar/comfortable with that than isql/osql.

regards,
May 22 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.