Lowell - Monday, April 10, 2017 10:51 AM
Hi Lowell, thank you so much for the great work. I have been using it as a function and it works very well.
I do have one issue: The stored procedure/view/function (not table) are created as their very original names. If I change the name from "lighting.pr_xxx_Store_Comm_report" to 'lighting.pr_report', it does not script with the name "lighting.pr_report", instead it always creates the original name proc. From what I can see, the system does not update to the new name as the definition in sys.sql_modules and the text in sys.syscomments are still using the original names.I wonder if there is a way we can fix it...
The script for this case is "IF OBJECT_ID('[lighting].[pr_report]') IS NOT NULL DROP PROCEDURE [lighting].[pr_report] GO CREATE PROC [lighting].[pr_Ameren_Store_Comm_report] AS ..." .