Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. EXEC sp_helptext

EXEC sp_helptext

Scheduled Pinned Locked Moved Database
databasetools
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jojoba2011
    wrote on last edited by
    #1

    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
    GO

    ALTER PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId]
    (@RecordId INT,@JobId INT,@StepId int)
    AS
    BEGIN

    SELECT 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)
    END

    but 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
    BEGIN

    SELECT 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

    M 1 Reply Last reply
    0
    • J jojoba2011

      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
      GO

      ALTER PROCEDURE [dbo].[tblVacationDaily_GetAllDetailsSenderReciverbyRecordIdANDJobIdAndStepId]
      (@RecordId INT,@JobId INT,@StepId int)
      AS
      BEGIN

      SELECT 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)
      END

      but 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
      BEGIN

      SELECT 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

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • M Mycroft Holmes

        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

        J Offline
        J Offline
        jojoba2011
        wrote on last edited by
        #3

        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@

        C 1 Reply Last reply
        0
        • J jojoba2011

          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@

          C Offline
          C Offline
          Corporal Agarn
          wrote on last edited by
          #4

          Try updating your statistics, "UPDATE STATISTICS..." This may not do anything but it might help

          J 1 Reply Last reply
          0
          • C Corporal Agarn

            Try updating your statistics, "UPDATE STATISTICS..." This may not do anything but it might help

            J Offline
            J Offline
            jojoba2011
            wrote on last edited by
            #5

            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

            L 1 Reply Last reply
            0
            • J jojoba2011

              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

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Try logic; you renamed it? Drop it, and create it anew?

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups