sp_helptext returns the wrong DDL, new SQL developer

  • Thread starter Thread starter punjab_tom
  • Start date Start date
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
 
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
 
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.
 
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
 
Back
Top