EXEC sp_helptext
-
my stored procedure is :
USE [CRM-CMSAlmas]
GO
/****** Object: StoredProcedure [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId] Script Date: 11/27/2012 13:07:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GOALTER PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId]
(@RecordId INT,@JobId INT,@StepId int)
AS
BEGINSELECT WF.Cartable.JobId, Forms.tblVacationDaily.Id, Forms.tblVacationDaily.IsWorkFlow, Forms.tblVacationDaily.CreateUserID,
Forms.tblVacationDaily.CreateDate, Forms.tblVacationDaily.StepId, Forms.tblVacationDaily.RecordId, Forms.tblVacationDaily.OrderId, Forms.tblVacationDaily.PersonId,
WF.Cartable.ForwardedUserId, WF.Cartable.RecieveUserId, WF.Cartable.IsDeleted, p1.FullName AS RecieveUserName, p2.FullName AS ForwardedUserName,
WF.Cartable.IsBack
FROM WF.Cartable INNER JOIN
WF.JobFormConjuction ON WF.JobFormConjuction.JobId = WF.Cartable.JobId INNER JOIN
Forms.tblVacationDaily ON Forms.tblVacationDaily.RecordId = WF.JobFormConjuction.RecordId AND Forms.tblVacationDaily.StepId = WF.Cartable.StepID - 1 INNER JOIN
Persons.People AS p1 ON p1.Id = WF.Cartable.RecieveUserId INNER JOIN
Persons.People AS p2 ON p2.Id = WF.Cartable.ForwardedUserId
WHERE (Forms.tblVacationDaily.RecordId = @RecordId) AND (WF.Cartable.JobId = @JobId) AND (Forms.tblVacationDaily.StepId<=@StepId)
ENDbut when i use EXEC sp_helptext [dbo.tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId] the result is :[Note: I have change Create ----> Alert
Alter PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsforSenderAndReciversbyRecordIdANDJobId]
(@RecordId INT,@JobId INT,@StepId int)
AS
BEGINSELECT WF.Cartable.JobId, Forms.tblVacationDaily.Id, Forms.tblVacationDaily.IsWorkFlow, Forms.tblVacationDaily.CreateUserID,
Forms.tblVacationDaily.CreateDate, Forms.tblVacationDaily.StepId, Forms.tblVacationDaily.RecordId, Forms.tblVacationDaily.OrderId, Forms.tblVacationDaily.PersonId,
WF.Cartable.ForwardedUserId, WF.Cartable.RecieveUserId, WF.Cartable.IsDeleted, p1.FullName AS RecieveUserName, p2.FullName AS ForwardedUserName,
WF.Cartable.IsBack
FROM WF.Cartable INNER JOIN -
my stored procedure is :
USE [CRM-CMSAlmas]
GO
/****** Object: StoredProcedure [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId] Script Date: 11/27/2012 13:07:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GOALTER PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId]
(@RecordId INT,@JobId INT,@StepId int)
AS
BEGINSELECT WF.Cartable.JobId, Forms.tblVacationDaily.Id, Forms.tblVacationDaily.IsWorkFlow, Forms.tblVacationDaily.CreateUserID,
Forms.tblVacationDaily.CreateDate, Forms.tblVacationDaily.StepId, Forms.tblVacationDaily.RecordId, Forms.tblVacationDaily.OrderId, Forms.tblVacationDaily.PersonId,
WF.Cartable.ForwardedUserId, WF.Cartable.RecieveUserId, WF.Cartable.IsDeleted, p1.FullName AS RecieveUserName, p2.FullName AS ForwardedUserName,
WF.Cartable.IsBack
FROM WF.Cartable INNER JOIN
WF.JobFormConjuction ON WF.JobFormConjuction.JobId = WF.Cartable.JobId INNER JOIN
Forms.tblVacationDaily ON Forms.tblVacationDaily.RecordId = WF.JobFormConjuction.RecordId AND Forms.tblVacationDaily.StepId = WF.Cartable.StepID - 1 INNER JOIN
Persons.People AS p1 ON p1.Id = WF.Cartable.RecieveUserId INNER JOIN
Persons.People AS p2 ON p2.Id = WF.Cartable.ForwardedUserId
WHERE (Forms.tblVacationDaily.RecordId = @RecordId) AND (WF.Cartable.JobId = @JobId) AND (Forms.tblVacationDaily.StepId<=@StepId)
ENDbut when i use EXEC sp_helptext [dbo.tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId] the result is :[Note: I have change Create ----> Alert
Alter PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsforSenderAndReciversbyRecordIdANDJobId]
(@RecordId INT,@JobId INT,@StepId int)
AS
BEGINSELECT WF.Cartable.JobId, Forms.tblVacationDaily.Id, Forms.tblVacationDaily.IsWorkFlow, Forms.tblVacationDaily.CreateUserID,
Forms.tblVacationDaily.CreateDate, Forms.tblVacationDaily.StepId, Forms.tblVacationDaily.RecordId, Forms.tblVacationDaily.OrderId, Forms.tblVacationDaily.PersonId,
WF.Cartable.ForwardedUserId, WF.Cartable.RecieveUserId, WF.Cartable.IsDeleted, p1.FullName AS RecieveUserName, p2.FullName AS ForwardedUserName,
WF.Cartable.IsBack
FROM WF.Cartable INNER JOINYou probably renamed the proc and the sp_help has not refreshed the name. If one of my devs named a proc like that he would get a first warning, there would be no second.
Never underestimate the power of human stupidity RAH
-
You probably renamed the proc and the sp_help has not refreshed the name. If one of my devs named a proc like that he would get a first warning, there would be no second.
Never underestimate the power of human stupidity RAH
Thanks in advanced but the sp was renamed before and now its working properly! but when i right click the sp and click on modify is diffrent from sp_helptext. and event the name of it in sp list is also different from sp_helptext ! But i dont get why this is happing@
-
Thanks in advanced but the sp was renamed before and now its working properly! but when i right click the sp and click on modify is diffrent from sp_helptext. and event the name of it in sp list is also different from sp_helptext ! But i dont get why this is happing@
Try updating your statistics, "UPDATE STATISTICS..." This may not do anything but it might help
-
Try updating your statistics, "UPDATE STATISTICS..." This may not do anything but it might help
thanks but no use ... on google : should update :sys.object/sys.storedprocedures/sys.sql_modules https://www.google.com/search?hl=en&tbo=d&q=sp_helptext+renamed+stored+procedures++%2B+sql&oq=sp_helptext+renamed+stored+procedures++%2B+sql&gs_l=serp.3...8091.13502.0.13693.20.20.0.0.0.0.488.3055.7j7j2j2j1.19.0.les%3B..0.0...1c.1.MmW-E40j8mE[^]
I dont know how
-
thanks but no use ... on google : should update :sys.object/sys.storedprocedures/sys.sql_modules https://www.google.com/search?hl=en&tbo=d&q=sp_helptext+renamed+stored+procedures++%2B+sql&oq=sp_helptext+renamed+stored+procedures++%2B+sql&gs_l=serp.3...8091.13502.0.13693.20.20.0.0.0.0.488.3055.7j7j2j2j1.19.0.les%3B..0.0...1c.1.MmW-E40j8mE[^]
I dont know how