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

Combine sql Queries

Zulku

Dirty Dev
Simple, short, sweet tutorial on how to combine sql queries.

Open command propmt.

Browse to location of all queries you wish to combine.
-To change locations in command propmpt use the command
Code:
 cd ..
to go up, or
Code:
 cd C:/Trinity/sql/INSERT_FOLDER_NAME_HERE
and continue to the folders destination through any sub-folders you have created.

Then execute the following command(s) based on your OS.

For Windows
Code:
copy *.sql update.sql

For Linux
Code:
cat *.sql > update.sql

Change the update.sql to the desired name of the sql file you wish it to be saved as.

Credits;
Google for translating the commands for linux
 

Parranoia

Insane Member
On windows you can have the directory open then shift right-click and choose to open the cmd prompt in that directory. Just to save some typing :p
 

Minion

Enthusiast
nice guide, i go tired of doing this myself (call me lazy if you like). so i chose this route:

make a new text file and put this in it:

Code:
copy *.sql all.sql

save it as a merge sql.bat. once that is done just copy/paste it to the folder where the sqls you want to combine are, run it, and presto all sqls are in one file called "all".

note: you can change the output name by editing the "all.sql" to "whateveryouwant.sql"

just remember not to delete the merge sql.bat just copy/paste it from a safe place, or you need to start all over (at that point you might as well just follow Zulku's and Parranoia's method)

i suppose i should mention this is for windows, but i would assume the linux command would work in the same manner
 
Last edited:
Top