C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






How to see whether the stored procedure is present or not?


Posted Date: 15 Jun 2008    Resource Type: Code Snippets    Category: SQL

Posted By: Bunty       Member Level: Diamond
Rating:     Points: 3



The following command shows whether the stored procedure is present or not.

use sp_helptext <proc-name>




Responses

Author: Kapil Dhawan    16 Jun 2008Member Level: Gold   Points : 2
Hello,
Thanks for sharing your knowledge with us.
Will this code work for extended Store procedure also.
I will appreciate if you can explain this more.
Regards,
Kapil


Author: PRAVEEN PANDEY    16 Jun 2008Member Level: Silver   Points : 2
HELLO DEAR I HAVE USED THIS CODE FOR KNOWING THAT OUR PROCEDURE
IS PRESENT OR NOT BUT ITS NOT GIVING PROPER RESULT.
I HAVE USED THIS.
use sp_helptext <proc-sp_Promotion_Select
BUT ITS SHOWING ERROR
Could not locate entry in sysdatabases for database 'sp_helptext'. No entry found with that name. Make sure that the name is entered correctly.


Author: Bunty    16 Jun 2008Member Level: Diamond   Points : 2
Hi,
Praveen,You use the sp_helptext in the current database in which the stored procedure is present.Hope this information is useful to you.If you still got the problem let me know.


Author: Bunty    18 Jun 2008Member Level: Diamond   Points : 1
Hi,
Kapil Dhawan.Sorry the above will not work for Extended Stored Procedure.


Author: lavanya    07 Aug 2008Member Level: Gold   Points : 1
You can check it like this

if exists(select * from sys.objects where type = 'P' and name = 'stored procedure name')

do ur insertion or deletion

go


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to Find Duplicate Records
Previous Resource: How to Update a table with update and case
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

budget conference call

Contact Us    Privacy Policy    Terms Of Use