Thursday, March 29, 2012

Embedding multiple .sql files

How do I write a .sql script that executes a number of other scripts in .sql
files? This has to be easy. I just can't find it.
Thanks,
JerryRYou can use oSql. See if this helps:
http://www.sql-server-performance.com/rd_osql.asp
Andrew J. Kelly SQL MVP
"JerryR" <JerryR@.discussions.microsoft.com> wrote in message
news:76549937-4F1E-41B5-B148-A548F0B8CA95@.microsoft.com...
> How do I write a .sql script that executes a number of other scripts in
> .sql
> files? This has to be easy. I just can't find it.
> Thanks,
> JerryR|||There is no such feature in SQL like this in Oracle @.Somefile.sql. You
have to put in in a OS batch to execute it via a cmdshell program like
SQLCMD or OSQL or ISQL.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Yes, that's what I was looking for.
Thanks
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1143927815.456011.236990@.v46g2000cwv.googlegroups.com...
> There is no such feature in SQL like this in Oracle @.Somefile.sql. You
> have to put in in a OS batch to execute it via a cmdshell program like
> SQLCMD or OSQL or ISQL.
>
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>

No comments:

Post a Comment