DISABLE/ENABLE TRIGGER bug
kondrich
Posts: 80 Bronze 2
Hello,
in SQL Prompt 6.4.0.659 there is a bug with ENABLE/DISABLE TRIGGER.
After choosing "ENABLE TRIGGER" it provides a list of triggers in the current database. If I select one, the statement is correctly expanded to
Can you reproduce that?
in SQL Prompt 6.4.0.659 there is a bug with ENABLE/DISABLE TRIGGER.
After choosing "ENABLE TRIGGER" it provides a list of triggers in the current database. If I select one, the statement is correctly expanded to
ENABLE TRIGGER owner.TriggerName ON owner.TableNameHowever, if I manually typed the owner of the trigger and then chose a trigger from the list, the owner name is not included for the table name. Result:
ENABLE TRIGGER owner.TriggerName ON TableNameBtw, the schema/owner of the trigger would be very useful in the suggestion list.
Can you reproduce that?
Regards, Klaus
Comments
Are you saying that you filled in the ON clause, then went back and filled in the trigger name?
I'll get a private build out to you with the table attached to the trigger shown in the suggestions window when I've made the change.
Best regards,
David
no, the error occurs when after typing the owner name of the trigger, then choosing the trigger from the suggestion list. After that SQL Prompt auto-completes the ON clause and the table name (forgetting the owner of the table).
I can reproduce this now! Thanks for your patience!
Best regards,
David
I've got a private build here that should fix the issue for you. It also should show the table the trigger refers to in the suggestions list.
Let me know if you encounter any problems.
Best regards,
David
thank you for fixing this issue. I confirm that the generated script now also contains the owner name of the table, even if the trigger owner was manually typed.
Including the table name in the suggestion list is very useful, too. Would it be possible to show the owner/schema of the table, too?
Currently in suggestion list: Suggested suggesion:
Would this only be applied to triggers? Or other object types that show up in suggestions?
Best regards,
David
displaying the owner name seems to be a little inconsistent for now: Schema/Owner is displayed for tables, but not for views, procedures, functions, triggers and synonyms.
We would find it useful to have the schema always in the suggestion box.
The owner is set to show only if there is an owner clash between two objects with the same name.
You can get the schema / owner to show for each item if you click on the "Show schema names" button:
Please let me know if this helps at all.
Best regards,
David
oh, I did not know this button. It's really useful. Thanks for the hint. It does exactly what I was looking for (however not for triggers).
Don't worry, it's not the most obvious!
You're quite right, it doesn't register for triggers. I'll put in a fix for that now.
Thanks,
David