• Lowell - Monday, April 10, 2017 10:51 AM

    For those of you subscribed to this thread, I've made some fixes today for a couple of things i found.

    These changes are  noted in section V3.17.

    When scripting foreign keys, the column name(s) were not quotenamed, so in the rare instance where you had column names that had spaces, dashes, or started with a number, the script was invalid.

    Secondly, I'm now 2016 and especially using ColumnStore Indexes pretty regularly, and the old script would create an invalid syntax for the column  store index.

    I plan on adding the scripting of memory optimized tables, but it's not there yet.

    So.....

     

    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 ..." .

    • This reply was modified 5 years, 2 months ago by  jhzhao88.
    • This reply was modified 1 month ago by  jhzhao88.