sp_helptext returns the wrong DDL, new SQL developer

P

punjab_tom

I have been cutting and pasting sprocs in an ADP-- seems like a pretty
natural thing to do.
I am signed in as 'sa'.

I'm confused about why this statement returns the wrong DDL?



-----------------------------------------------------------------------------------------
sp_helptext 'QA41_AddressBook'



CREATE PROCEDURE dbo.QA40_AddressBook
AS INSERT INTO dbo.AddressBook
(OptinID, iTypeID)
SELECT OptinID, 1 AS Expr1
FROM dbo_Optin
 
P

punjab_tom

I mean to say I cut and paste in Access Data Project and then I run
sp_helptext in Sql Server Management Studio 2005

-Tom
 
S

Sylvain Lafontaine

sp_helptext 'QA41_AddressBook' or sp_helptext 'QA40_AddressBook' ?

Try with « sp_helptext 'dbo.QA40_AddressBook' » in case you would have
another stored procedure with the same name 'QA40_AddressBook' but for
another owner.
 
P

punjab_tom

I definitely don't have another sproc with that name

I have seen this before- sp_helptext reveals the wrong verbage... i
swear it is caused by cutting and pasting stored procedures in ADP.

I'd just love if anyone has an answer / fix for it?

Maybe a hotfix? Or a TSQL batch that will update the system tables
that sp_helptext pulls from?

-Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top