How to Make this Sp a hard delete Proc?

  • Please help me.

    CREATE PROCEDURE [Test].[usp_EmployeeEmail_delete]

    @Email_ID Bigint,

    @Phone_ID Bigint

    AS

    Delete From Test.Email where Email_ID = @Email_ID and Phone_ID=@Phone_ID

    If not exists (Select 1 from Test.EmployeeEmail where Email_ID=@Email_ID )

    Begin

    Exec Test.usp_EmployeeEmail_Delete @Email_ID

    END

  • What's the question?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • How to make hard deletes using this procedure.

  • Looks like you have it already. Are you getting an error?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • venu0317 (5/23/2011)


    How to make hard deletes using this procedure.

    What do you mean by a 'hard delete'? The proc already looks like it deletes the rows. What's it not doing that you want it to do?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I got it...Thanks

  • goushik (5/23/2011)


    I got it...Thanks

    Glad you got it. Can you share?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply