Book a Demo

Author Topic: SQL Server 2000 Trigger Problem  (Read 3045 times)

deboeck

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
SQL Server 2000 Trigger Problem
« on: April 19, 2005, 08:34:40 am »
Hi,

 Adding a trigger on a table (with Operations in the context menu of a table) generates a "create trigger" statement in the DDL which has no "GO" statement in front. SQL Server 2000 does not accept a "create trigger" statement which is not the first line in a batch.
 Does there exist a work around for this behaviour ?

Thanks,
Bart

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: SQL Server 2000 Trigger Problem
« Reply #1 on: August 16, 2005, 08:38:06 am »
I had the same problem, though I had it with "CREATE PROCEDURE" commands. I was in the process of sending a support request about this, when I realized that the DDL commands were separated by "\n;\n", and that there is a text box in the "GENERATE DDL" dialog which says "Use ; as SQL Separator".

If I replace the ";" with "GO", then I get the right DDL. Perhaps this will help you.
John Saunders

deboeck

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: SQL Server 2000 Trigger Problem
« Reply #2 on: August 23, 2005, 09:44:49 am »
Hi John,

 Thanks for the tip. It seems to me that this functionality should be present whenever SQL Server is selected. What do you think ?

Regards,
Bart

Quote
I had the same problem, though I had it with "CREATE PROCEDURE" commands. I was in the process of sending a support request about this, when I realized that the DDL commands were separated by "\n;\n", and that there is a text box in the "GENERATE DDL" dialog which says "Use ; as SQL Separator".

If I replace the ";" with "GO", then I get the right DDL. Perhaps this will help you.


JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: SQL Server 2000 Trigger Problem
« Reply #3 on: August 23, 2005, 01:07:55 pm »
Yes, I think that should be the default, since it's what SQL Server wants by default.
John Saunders