pass it displayed ALTER and now it displays CREATE. How can I put it back?
Thanks,
DaveClick "Script Object to New Window As" > "CREATE" rather than "Edit".
Then you'll have to drop the proc before you can run the script, which
is why Edit puts in the ALTER statement instead of CREATE.
David Portas
SQL Server MVP
--|||Its just sql trying to helpful. It assumes as you are looking at it you abou
t
to change it, so it helpfully changes the create to an alter. I does not
effect you schema in any way.
You can prove this by scripting the database.
"Government does not solve problems; it subsidizes them."
Ronald Reagan
"Dave" wrote:
> In query Analyzer I right click on a stored procedure and click edit. In t
he
> pass it displayed ALTER and now it displays CREATE. How can I put it back?
> Thanks,
> Dave|||Apologies for the previous post, I must learn to read properly.
I take it that edit ->Script Object to New Window->alter doesn't work ?
"A politician needs the ability to foretell what is going to happen
tomorrow, next w

afterwards to explain why it didn't happen."
Winston Churchill
"Dave" wrote:
> In query Analyzer I right click on a stored procedure and click edit. In t
he
> pass it displayed ALTER and now it displays CREATE. How can I put it back?
> Thanks,
> Dave|||I ment when I click "Edit" I get CREATE now. I have been using the for years
and now it changed
"David Portas" wrote:
> Click "Script Object to New Window As" > "CREATE" rather than "Edit".
> Then you'll have to drop the proc before you can run the script, which
> is why Edit puts in the ALTER statement instead of CREATE.
> --
> David Portas
> SQL Server MVP
> --
>|||You may have made some subtle change to the spacing or
commenting of the beginning of the procedure. The script
generator identifies "create" naively and changes it to ALTER
where it is found. If you create the following procedures,
you'll see that pCREATE comes up with CREATE when
you edit it, pALTER comes up with ALTER when you
edit it, and oopsCREATE comes up with a wrong procedure
name oopsALTER when you edit it!
CREATE PROC pALTER (
@.i int
) as select 'pALTER'
go
CREATE
PROC pCREATE (
@.i int
) as select 'pCREATE'
go
CREATE
--
PROC oopsCREATE (
@.i int
) as select 'Oops!!'
go
-- Steve Kass
-- Drew University
Dave wrote:
>I ment when I click "Edit" I get CREATE now. I have been using the for year
s
>and now it changed
>"David Portas" wrote:
>
>|||It seems like they fixed that, Steve. I get ALTER in each case on
8.00.818.
David Portas
SQL Server MVP
--|||I had a comment directly above. I put a blank line in and then it worked.
Thanks Everyone,
Dave
"David Portas" wrote:
> It seems like they fixed that, Steve. I get ALTER in each case on
> 8.00.818.
> --
> David Portas
> SQL Server MVP
> --
>|||Strange. I'm also running 8.00.818, and I do not get ALTER in each case.
The object browser version must not be completely dependent on the
server version.
SK
David Portas wrote:
>It seems like they fixed that, Steve. I get ALTER in each case on
>8.00.818.
>
>
No comments:
Post a Comment