Re: what word will stop everything after it in a SQL script?
From: Anthony Faull (anthony.faull_at_NOSPAMsanlam.co.za)
Date: 06/15/04
- Next message: Hugo Kornelis: "Re: How to get distinct... under certain conditions"
- Previous message: SriSamp: "Re: Get sql server sp Parameters from system tables or sp..."
- In reply to: Peter Yeoh: "Re: what word will stop everything after it in a SQL script?"
- Next in thread: Steve Kass: "Re: what word will stop everything after it in a SQL script?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 15 Jun 2004 09:22:28 +0200
How about "USE tempdb" or "USE pubs".
"Peter Yeoh" <nospam@nospam.com> wrote in message
news:e6oPeooUEHA.1048@tk2msftngp13.phx.gbl...
> That will only work if your entire script does not have a GO statement
> somewhere in the middle. If there is, you need to put BREAK after each GO
> statement.
>
> Peter Yeoh
> http://www.yohz.com
> Need smaller SQL2K backup files? Try MiniSQLBackup
>
>
> "Peter Yeoh" <nospam@nospam.com> wrote in message
> news:erpO$joUEHA.2840@TK2MSFTNGP11.phx.gbl...
> > Try BREAK.
> >
> > Peter Yeoh
> > http://www.yohz.com
> > Need smaller SQL2K backup files? Try MiniSQLBackup
> >
> >
> > "AFN" <DELETEnewsgroupCAPSaccount@yahoo.com> wrote in message
> > news:fPtzc.1585$fd.116@twister.socal.rr.com...
> > > Actually, I don't know if the word "script" is correct or not, but
> here's
> > my
> > > problem...
> > >
> > > I have a Query Analyzer script file that I keep open for lots of
> potential
> > > issues each day. I never run the whole thing. I just highlight the
> > piece
> > > I need, and click play. I have about 300 statements in this file on
my
> > > screen.
> > >
> > > The problem is when I forget to highlight something before clicking
> play.
> > > Suddenly it wants to execute everything on the screen. If I had
update
> > or
> > > delete statements somewhere on the screen, I'm worried it will execute
> > them.
> > > It is only a developer database, but I don't want to waste time
> restoring
> > > it.
> > >
> > > Is there some keyword I can put at the top of the screen/file, so it
> will
> > > stop executing everything beneath it? I tried "stop" but that didn't
> > work.
> > > I tried "use xyz" but unless xyz is a real database, it won't work
> either,
> > > and I don't want to specify a real database name. I could create a
> > database
> > > name just for this purpose, but that seems wasteful if there's a
keyword
> > > that does what I want. Is there?
> > >
> > >
> >
> >
>
>
- Next message: Hugo Kornelis: "Re: How to get distinct... under certain conditions"
- Previous message: SriSamp: "Re: Get sql server sp Parameters from system tables or sp..."
- In reply to: Peter Yeoh: "Re: what word will stop everything after it in a SQL script?"
- Next in thread: Steve Kass: "Re: what word will stop everything after it in a SQL script?"
- Messages sorted by: [ date ] [ thread ]