Re: is there a way to call sql script from inside of sql

Re: is there a way to call sql script from inside of sql

 

  

What i have is a sql script that builds tables and other objects and what i
need
is to be able to run other filename.sql scripts in side of the first. For
instance in oracle
i make an installer.sql and do this:

@createtable.sql
@altertable.sql
@select.sql
@insert.sql
@delete.sql
etc.....

from inside the install.sql so instead of having one really huge
sql script i have many smaller ones that all get run from another
filename.sql.


At 11:55 AM 5/23/2002 -0700, Parag Kulkarni wrote:
>What I meant to say is
>
>For example you have a Stored Procedure GetUsers and
>you want to execute some other stored
>procedure,GetEmployeesInfo , which u need inside
>GetUsers
>
>Then inside Getusers stored procedure you write a
>command like
>Exec GetEmployeeInfo.
>
>I hope thats what you wanted.
>
>
>
>--- Bill Conner <bill.[Email Address Removed] wrote:
> > It says "could not find stored procedure
> > 'ScriptName' " and aborts out of
> > the main script.
> >
> > At 11:12 AM 5/23/2002 -0700, Parag Kulkarni wrote:
> > >Yes you can do it by the syntax below
> > >
> > >Exec ScriptName
> > >
> > >
> > >
> > >
> > >
> > >--- Bill Conner <bill.[Email Address Removed] wrote:
> > > > Hi All,
> > > >
> > > > Is there any way to execute a sql script from
> > inside
> > > > of sql script?
> > > >
> > > > Thanks,
> > > >
> > > > -bill
> > > >
> > > >
> > > >
> > > >
> >
> >---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > mssqldba-[Email Address Removed] > > > For additional commands, e-mail:
> > > > mssqldba-[Email Address Removed] > > >
> > >
> > >
> > >__________________________________________________
> > >Do You Yahoo!?
> > >LAUNCH - Your Yahoo! Music Experience
> > >http://launch.yahoo.com
> > >
> >
> >---------------------------------------------------------------------
> > >To unsubscribe, e-mail:
> > mssqldba-[Email Address Removed] > >For additional commands, e-mail:
> > mssqldba-[Email Address Removed] >
> >
> >
> >
>---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > mssqldba-[Email Address Removed] > For additional commands, e-mail:
> > mssqldba-[Email Address Removed] >
>
>
>__________________________________________________
>Do You Yahoo!?
>LAUNCH - Your Yahoo! Music Experience
>http://launch.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page