473,387 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

call script from another script

OD
Hello,

Is it possible with sqlserver to call a sql script from another sql script,
like @ in oracle ?

Thanks,

Olivier
Mar 25 '08 #1
3 11670
Is it possible with sqlserver to call a sql script from another sql
script, like @ in oracle ?
You can call another script using ":r" in SQLCMD (or SSMS in SQLCMD mode).
For example:

:r C:\SqlScripts\Script1.sql

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

"OD" <ol***************@free.frwrote in message
news:47***********************@news.free.fr...
Hello,

Is it possible with sqlserver to call a sql script from another sql
script, like @ in oracle ?

Thanks,

Olivier
Mar 25 '08 #2
OD
Thanks, it works very well.

Is there an equivalent for sqlserver 2000 ?

Olivier.

"Dan Guzman" <gu******@nospam-online.sbcglobal.neta écrit dans le message
de news: ZU****************@newssvr22.news.prodigy.net...
>Is it possible with sqlserver to call a sql script from another sql
script, like @ in oracle ?

You can call another script using ":r" in SQLCMD (or SSMS in SQLCMD mode).
For example:

:r C:\SqlScripts\Script1.sql

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

"OD" <ol***************@free.frwrote in message
news:47***********************@news.free.fr...
>Hello,

Is it possible with sqlserver to call a sql script from another sql
script, like @ in oracle ?

Thanks,

Olivier

Mar 26 '08 #3
OD (ol***************@free.fr) writes:
Thanks, it works very well.

Is there an equivalent for sqlserver 2000 ?
As I recall, :r works in OSQL as well. And OSQL comes with SQL 2000.
--
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
Mar 26 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Greg Chapman | last post by:
I am at my wit's end trying to get information out of Streamline.net's support dept about my problem. They reply quickly enough, but seem to try and give out the least possible amount of info each...
3
by: Tubby Tudor | last post by:
What is the best way to call one python script from within another python script? For example: one.py finishes succesfully and calls two.py which finishes OK and then calls three.py Thanks...
3
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
7
by: priya.tweety | last post by:
How to call a js file from another js file?
4
by: Christian | last post by:
From a not even newbie: Without knowing much about Python (yet) I'm trying to install the CMS Zope via FTP (with the well documented changes to make it work on an Apache server). By birth Zope...
10
by: bienwell | last post by:
Hi, I have a question about file included in ASP.NET. I have a file that includes all the Sub functions (e.g FileFunct.vb). One of the functions in this file is : Sub TestFunct(ByVal...
3
by: KaNos | last post by:
Hi, "robot script pages" are html+javascript pages, can be played in aspx player. So in this tech, robot call aspx player's function (an interface is sheared) and wait a result synchronously with...
2
by: harishdixit1 | last post by:
Hello friends i developed a tollbar for Firefox browser. Now This toolbar contains a menu item. A web page will be opened by the user of the Toolbar. This Web page source code has included many .JS...
1
by: Karim Ali | last post by:
Hi, I would really appreciate help on this. I have a script (s1.py) which I would like to call from another script (s2.py). No problem there. The first issue is that s1.py has a command line...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.