• Register
Home  //  Techbauchery  //  OS and Applications  //  Windows  //  Merging SQL Files

When compiling Mangos, Trinity or various other emulators and/or projects, I find myself with updates galore. While the core package might be updated and the core was released a week ago, changes keep coming in. These changes are normally found in the format of a .SQL file. If you waited a week or two or even a month, those .SQL files just pile up. Depending on which SQL editor you use, this could be an incredibly time-consuming affair to import all these changes one at a time. So, why not merge them all into one file? Brilliant! Gather up all the .SQL files you need to apply into one folder. Browse to that folder from a command prompt and run the following, creating just one file to import -

copy *.sql merged.sql

Example :

C:\Trinity\sql\updates\world>copy *.sql merged.sql
2012_11_21_00_world_sai.sql
2012_11_24_00_world_conditions.sql
2012_11_24_00_world_creature_text.sql
2012_11_24_01_world_quest_start_scripts.sql
2012_11_24_02_world_creature_text.sql
2012_11_24_02_world_gossip_menu_option.sql
2012_11_24_03_world_various_fixes.sql
2012_11_24_04_world_sai.sql
2012_11_25_00_world_various_fixes.sql
2012_11_25_01_world_various_fixes.sql
2012_11_26_02_world_conditions.sql
2012_11_26_03_world_misc.sql
        1 file(s) copied.