• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

How to merge SQL files, ( might sound stupid! but can come in handy! ) :)

OMGhixD

Sexy Member
Heyyooooo!

im here to show u guys how to Merge Sql's into 1 SQL =)

Step 1: Put ALL the SQLs in the same folder
step 2: Hold Shift and right click, after doing that select and click command prompt.
step 3: Copy Paste this or type it, ur desition. '' copy *sql merged.sql
( do not copy the QOUTE'S )
step 4: run ur merged SQL! simple as that!
Hope it worked!

FOR LINUX DO IT THIS WAY!

cat *.sql > all.sql

Credits to Faded for provideing me with the information!
 
Last edited:

Epicblood

Epic Member
This doesn't work. It will end up copying the SQL files out of order and fucks em up, resulting in errors and incomplete patching. (might be wrong, but this always happens to me, I compared the merged.sql with a number of the not-merged ones)
 

OMGhixD

Sexy Member
This doesn't work. It will end up copying the SQL files out of order and fucks em up, resulting in errors and incomplete patching. (might be wrong, but this always happens to me, I compared the merged.sql with a number of the not-merged ones)

This is kinda the idea, it wil take every SQL file in that folder, and Create it into 1 merged SQL file.
 

Epicblood

Epic Member
This is kinda the idea, it wil take every SQL file in that folder, and Create it into 1 merged SQL file.
I know xD but it does not merge them in order IE the first SQL in your folder, the first one that needs to be executed, will not be executed first. This causes errors and patches to not apply properly, leaving you with a database that has to be recreated.
 

OMGhixD

Sexy Member
I know xD but it does not merge them in order IE the first SQL in your folder, the first one that needs to be executed, will not be executed first. This causes errors and patches to not apply properly, leaving you with a database that has to be recreated.

ohh, i honestly did not know that. ive used it for udating my trinitycore DB like all the time, havent failed me yet! :p
 

Laurea

Enthusiast
I've been using this method for a while without problems. Atleast with TC's structure (yyyy-mm-dd-ii-tablename) it should copy files in the same order they appear when sorting by ascending name.
 
Last edited by a moderator:

AlexeWarr

Epic Member
select all the sql files in the folder, make sure you have heidisql opened and drag them over the heidisql icon in the navbar untill the tab shows up in the screen, then drop it in the query tab :p
 

Hamar

BETA Tester
This doesn't work. It will end up copying the SQL files out of order and fucks em up, resulting in errors and incomplete patching. (might be wrong, but this always happens to me, I compared the merged.sql with a number of the not-merged ones)

That happens only because you didn't order the updates folder by date.
You should always start from the bottom and go up..
 
Top