I am having a weird problem. I have created a stored procedure and executed it successfully.
But when I try to look for it in the database, it doesn't show the code inside the procedure. I mean if I right click and say modify to see my procedure's code, it shows only following code :
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE Proc_Name
Why its not showing the complete code? I deleted the procedure from database and again executed then it says "There is already an object named 'Proc_Name'in the database." and it shows the same code.
If right-click - Modify does not show the text of the stored procedure, try the following:
SELECT text
FROM syscomments
WHERE id = (SELECT id FROM sysobjects WHERE name = 'proc_name')
Replace proc_name with the name of the stored procedure in question.
If that works, I would think about re-creating it using a standard template, like the one you get when you right-click Stored Procedures - New Stored Procedure, and cleaning up any odd formatting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With