Merge multiple .sql files into One

  • Hi Everyone

    I am trying to merge multiple .sql scripts into 1 file so that i can run all the scripts at once.

    Can anyone advice on how can i go about it?

    Thanks in advance for any help.

    Vivek

    Vivek Shukla - MCTS SQL Server 2008

  • Long back I did that. I created one batch file to do this. This batch file consists of the location of all the .sql files. This is just a hint. Let all other members know how to do this if you resolve this.

    -LK

  • DOS command copy can be used with + as follows:

    copy File1.sql + File2.sql + ... + FileN.sql FileAll.sql

  • thanks guys. 🙂

    Also, you can do it with red gate's multiple script, i've found out.

    Vivek

    Vivek Shukla - MCTS SQL Server 2008

  • Vow Suresh!!

    I am able to copy this but one extra character () is also introduced here by using copy command. How to get rid of this?

    Lucky

    -LK

  • I have tried that also and i dont have that special character appearing.

    It seems like you have an extra character at the end of you script or something (e.g. space)

    Vivek

    Vivek Shukla - MCTS SQL Server 2008

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply