Unix Technical Forum

loading sql files from a master file Oracle equivalent

This is a discussion on loading sql files from a master file Oracle equivalent within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi. I need to give my customer an sql file that they can run in query analyzer. All the ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 07:24 PM
Jeff Kish
 
Posts: n/a
Default loading sql files from a master file Oracle equivalent

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 07:26 PM
Erland Sommarskog
 
Posts: n/a
Default Re: loading sql files from a master file Oracle equivalent

Jeff Kish (jeff.kish@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, esquel@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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 07:27 PM
Jeff Kish
 
Posts: n/a
Default Re: loading sql files from a master file Oracle equivalent

On Fri, 19 May 2006 22:14:03 +0000 (UTC), Erland Sommarskog
<esquel@sommarskog.se> wrote:

>Jeff Kish (jeff.kish@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,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com