Problems with alter trigger

EsioNEsioN Posts: 103
edited July 20, 2007 11:15AM in SQL Prompt Previous Versions
Some of my trigger has blank line before the create trigger statement.
For these trigger, SP3.5 doesn't show me the code. They are listed in alter trigger <trigger list), but the code doesn't appear.

Thanks.

Comments

  • Bart ReadBart Read Posts: 997 Silver 1
    Hi Esio,


    Can you paste an example of what you mean please? I can't see any reason why a blank line before the CREATE TRIGGER would cause a problem.


    Thanks,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Hi Bart. I tried to understand this, but can't explain this also.
    And look, if I use the following statement, but with alter table, with the blank lines before the statement, when I refresh the cache. SP35 now can show the trigger code, but doesn't show the blank lines
    **********************




    CREATE trigger AMZ_Delete on dbo.ARMAZEM
    for DELETE
    as
    select * into #inseridos from inserted
    select * into #deletados from deleted
    execute dbo.pr_Grava_Log 'ARMAZEM'
    @ERROR <> 0 GOTO Erro
    return

    ERRO:
    begin
    ROLLBACK TRANSACTION
    @servername)
    RETURN
    end





    *******************************
  • Bart ReadBart Read Posts: 997 Silver 1
    Hmm, that's odd. I can't see that causing a problem particularly. I did notice that if you've got more than one space between your CREATE and TRIGGER keywords it'll go a bit pear-shaped, which is slightly embarassing. I'll make sure that's fixed in the patch release for sure.


    Cheers,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
Sign In or Register to comment.