Showing posts with label analyzer. Show all posts
Showing posts with label analyzer. Show all posts

Wednesday, March 7, 2012

how to comment out a block of codes in SQL Query Analyzer?

Hello,
I know '--' can be used to comment out a single line. I tried /* and */ but
got the follow errors.
/*use master
go
exec sp_addlinkedsrvlogin
@.rmtsrvname = 'access',
@.useself = false,
@.locallogin = 'administrator',
@.rmtuser = 'admin',
@.rmtpassword = NULL
*/
Server: Msg 113, Level 15, State 1, Line 1
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 8
Line 8: Incorrect syntax near '*'.
Thanks,
Bing
bing wrote on Tue, 29 Nov 2005 09:02:15 -0800:

> Hello,
> I know '--' can be used to comment out a single line. I tried /* and */
> but got the follow errors.
> /*use master
> go
> exec sp_addlinkedsrvlogin
> @.rmtsrvname = 'access',
> @.useself = false,
> @.locallogin = 'administrator',
> @.rmtuser = 'admin',
> @.rmtpassword = NULL
> */
> Server: Msg 113, Level 15, State 1, Line 1
> Missing end comment mark '*/'.
> Server: Msg 170, Level 15, State 1, Line 8
> Line 8: Incorrect syntax near '*'.
> Thanks,
> Bing
The GO is being interpreted as a batch delimiter. Just add some additional
markers around the GO.
/*
use master
*/
go
/*
exec sp_addlinkedsrvlogin
@.rmtsrvname = 'access',
@.useself = false,
@.locallogin = 'administrator',
@.rmtuser = 'admin',
@.rmtpassword = NULL
*/
Dan
|||"Daniel Crichton" wrote:

> bing wrote on Tue, 29 Nov 2005 09:02:15 -0800:
>
> The GO is being interpreted as a batch delimiter. Just add some additional
> markers around the GO.
> /*
> use master
> */
> go
> /*
> exec sp_addlinkedsrvlogin
> @.rmtsrvname = 'access',
> @.useself = false,
> @.locallogin = 'administrator',
> @.rmtuser = 'admin',
> @.rmtpassword = NULL
> */
>
Ah, ok, thanks much for the heads-up.
Bing

how to comment out a block of codes in SQL Query Analyzer?

Hello,
I know '--' can be used to comment out a single line. I tried /* and */ but
got the follow errors.
/*use master
go
exec sp_addlinkedsrvlogin
@.rmtsrvname = 'access',
@.useself = false,
@.locallogin = 'administrator',
@.rmtuser = 'admin',
@.rmtpassword = NULL
*/
Server: Msg 113, Level 15, State 1, Line 1
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 8
Line 8: Incorrect syntax near '*'.
Thanks,
Bingbing wrote on Tue, 29 Nov 2005 09:02:15 -0800:

> Hello,
> I know '--' can be used to comment out a single line. I tried /* and */
> but got the follow errors.
> /*use master
> go
> exec sp_addlinkedsrvlogin
> @.rmtsrvname = 'access',
> @.useself = false,
> @.locallogin = 'administrator',
> @.rmtuser = 'admin',
> @.rmtpassword = NULL
> */
> Server: Msg 113, Level 15, State 1, Line 1
> Missing end comment mark '*/'.
> Server: Msg 170, Level 15, State 1, Line 8
> Line 8: Incorrect syntax near '*'.
> Thanks,
> Bing
The GO is being interpreted as a batch delimiter. Just add some additional
markers around the GO.
/*
use master
*/
go
/*
exec sp_addlinkedsrvlogin
@.rmtsrvname = 'access',
@.useself = false,
@.locallogin = 'administrator',
@.rmtuser = 'admin',
@.rmtpassword = NULL
*/
Dan|||"Daniel Crichton" wrote:

> bing wrote on Tue, 29 Nov 2005 09:02:15 -0800:
>
>
> The GO is being interpreted as a batch delimiter. Just add some additional
> markers around the GO.
> /*
> use master
> */
> go
> /*
> exec sp_addlinkedsrvlogin
> @.rmtsrvname = 'access',
> @.useself = false,
> @.locallogin = 'administrator',
> @.rmtuser = 'admin',
> @.rmtpassword = NULL
> */
>
Ah, ok, thanks much for the heads-up.
Bing

Friday, February 24, 2012

how to comment out a block of codes in SQL Query Analyzer?

Hello,
I know '--' can be used to comment out a single line. I tried /* and */ but
got the follow errors.
/*use master
go
exec sp_addlinkedsrvlogin
@.rmtsrvname = 'access',
@.useself = false,
@.locallogin = 'administrator',
@.rmtuser = 'admin',
@.rmtpassword = NULL
*/
Server: Msg 113, Level 15, State 1, Line 1
Missing end comment mark '*/'.
Server: Msg 170, Level 15, State 1, Line 8
Line 8: Incorrect syntax near '*'.
Thanks,
Bingbing wrote on Tue, 29 Nov 2005 09:02:15 -0800:
> Hello,
> I know '--' can be used to comment out a single line. I tried /* and */
> but got the follow errors.
> /*use master
> go
> exec sp_addlinkedsrvlogin
> @.rmtsrvname = 'access',
> @.useself = false,
> @.locallogin = 'administrator',
> @.rmtuser = 'admin',
> @.rmtpassword = NULL
> */
> Server: Msg 113, Level 15, State 1, Line 1
> Missing end comment mark '*/'.
> Server: Msg 170, Level 15, State 1, Line 8
> Line 8: Incorrect syntax near '*'.
> Thanks,
> Bing
The GO is being interpreted as a batch delimiter. Just add some additional
markers around the GO.
/*
use master
*/
go
/*
exec sp_addlinkedsrvlogin
@.rmtsrvname = 'access',
@.useself = false,
@.locallogin = 'administrator',
@.rmtuser = 'admin',
@.rmtpassword = NULL
*/
Dan|||"Daniel Crichton" wrote:
> bing wrote on Tue, 29 Nov 2005 09:02:15 -0800:
> > Hello,
> >
> > I know '--' can be used to comment out a single line. I tried /* and */
> > but got the follow errors.
> >
> > /*use master
> > go
> >
> > exec sp_addlinkedsrvlogin
> > @.rmtsrvname = 'access',
> > @.useself = false,
> > @.locallogin = 'administrator',
> > @.rmtuser = 'admin',
> > @.rmtpassword = NULL
> > */
> >
> > Server: Msg 113, Level 15, State 1, Line 1
> > Missing end comment mark '*/'.
> > Server: Msg 170, Level 15, State 1, Line 8
> > Line 8: Incorrect syntax near '*'.
> >
> > Thanks,
> >
> > Bing
>
> The GO is being interpreted as a batch delimiter. Just add some additional
> markers around the GO.
> /*
> use master
> */
> go
> /*
> exec sp_addlinkedsrvlogin
> @.rmtsrvname = 'access',
> @.useself = false,
> @.locallogin = 'administrator',
> @.rmtuser = 'admin',
> @.rmtpassword = NULL
> */
>
Ah, ok, thanks much for the heads-up.
Bing

how to close results window in 2005 query analyzer?

Other than ctr-R, is there a way to close the results window after running a
query in 2005's query analyzer? In 2000 there was a "Show results Pane"
button. I can't find this button in 2005.
Thanks so much!
WalterHi,
It's there in 2005 also, In ToolBar under Window's option the 3rd one is
"Show result Pane"
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and
time
asking back if its 2000 or 2005]
"Walter Mallon" wrote:

> Other than ctr-R, is there a way to close the results window after running
a
> query in 2005's query analyzer? In 2000 there was a "Show results Pane"
> button. I can't find this button in 2005.
> Thanks so much!
> Walter
>
>|||Thanks!!!
Walter
"Sreejith G" <SreejithG@.discussions.microsoft.com> wrote in message
news:5B8747C2-FD80-4B83-B7A2-6D1E01D4C029@.microsoft.com...[vbcol=seagreen]
> Hi,
> It's there in 2005 also, In ToolBar under Window's option the 3rd one is
> "Show result Pane"
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread an
d
> time
> asking back if its 2000 or 2005]
>
> "Walter Mallon" wrote:
>

how to close results window in 2005 query analyzer?

Other than ctr-R, is there a way to close the results window after running a
query in 2005's query analyzer? In 2000 there was a "Show results Pane"
button. I can't find this button in 2005.
Thanks so much!
WalterHi,
It's there in 2005 also, In ToolBar under Window's option the 3rd one is
"Show result Pane"
--
Thanks,
Sree
[Please specify the version of Sql Server as we can save one thread and time
asking back if its 2000 or 2005]
"Walter Mallon" wrote:
> Other than ctr-R, is there a way to close the results window after running a
> query in 2005's query analyzer? In 2000 there was a "Show results Pane"
> button. I can't find this button in 2005.
> Thanks so much!
> Walter
>
>|||Thanks!!!
Walter
"Sreejith G" <SreejithG@.discussions.microsoft.com> wrote in message
news:5B8747C2-FD80-4B83-B7A2-6D1E01D4C029@.microsoft.com...
> Hi,
> It's there in 2005 also, In ToolBar under Window's option the 3rd one is
> "Show result Pane"
> --
> Thanks,
> Sree
> [Please specify the version of Sql Server as we can save one thread and
> time
> asking back if its 2000 or 2005]
>
> "Walter Mallon" wrote:
>> Other than ctr-R, is there a way to close the results window after
>> running a
>> query in 2005's query analyzer? In 2000 there was a "Show results Pane"
>> button. I can't find this button in 2005.
>> Thanks so much!
>> Walter
>>