Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Merge text files

Merge text files

Scheduled Pinned Locked Moved The Lounge
databaseai-modelstoolsquestion
10 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steve McLenithan
    wrote on last edited by
    #1

    Is there a tool that can take say 25 .sql scripts and merge them in order into one huge script? I'm sick of doing db updates one at a time X|

    Steve McLenithan
    Is Bert Evil? | Homer: "Hello, operator, gimme the number for 911!"

    B Z 2 Replies Last reply
    0
    • S Steve McLenithan

      Is there a tool that can take say 25 .sql scripts and merge them in order into one huge script? I'm sick of doing db updates one at a time X|

      Steve McLenithan
      Is Bert Evil? | Homer: "Hello, operator, gimme the number for 911!"

      B Offline
      B Offline
      Bruce Duncan
      wrote on last edited by
      #2

      Try the humble copy command copy subscript*.sql mergedscript.sql

      Searching the web without Google is like straining sewage with your teeth.
      Userfriendly, 2003/06/07

      S L M 3 Replies Last reply
      0
      • B Bruce Duncan

        Try the humble copy command copy subscript*.sql mergedscript.sql

        Searching the web without Google is like straining sewage with your teeth.
        Userfriendly, 2003/06/07

        S Offline
        S Offline
        Steve McLenithan
        wrote on last edited by
        #3

        Good idea! I'll give it a whirl;)

        Steve McLenithan
        Is Bert Evil? | Homer: "Hello, operator, gimme the number for 911!"

        1 Reply Last reply
        0
        • S Steve McLenithan

          Is there a tool that can take say 25 .sql scripts and merge them in order into one huge script? I'm sick of doing db updates one at a time X|

          Steve McLenithan
          Is Bert Evil? | Homer: "Hello, operator, gimme the number for 911!"

          Z Offline
          Z Offline
          ZoogieZork
          wrote on last edited by
          #4

          I may be missing something here, but I used to just concatenate them all together one after the other into one big file with type a.sql b.sql c.sql > all.sql... - Mike

          1 Reply Last reply
          0
          • B Bruce Duncan

            Try the humble copy command copy subscript*.sql mergedscript.sql

            Searching the web without Google is like straining sewage with your teeth.
            Userfriendly, 2003/06/07

            L Offline
            L Offline
            Lunchy
            wrote on last edited by
            #5

            Awesome! Just when I thought I'd seen it all as far as DOS wildcards... :-D -Lunchy

            1 Reply Last reply
            0
            • B Bruce Duncan

              Try the humble copy command copy subscript*.sql mergedscript.sql

              Searching the web without Google is like straining sewage with your teeth.
              Userfriendly, 2003/06/07

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              Aw, but that's no fun! If you really wanna impress, do something like for %a in (*.sql) do type "%a" >> merged.sql ;) --Mike-- "I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage." -- Chris Maunder, relativistic system administrator Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber

              N B J L 4 Replies Last reply
              0
              • M Michael Dunn

                Aw, but that's no fun! If you really wanna impress, do something like for %a in (*.sql) do type "%a" >> merged.sql ;) --Mike-- "I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage." -- Chris Maunder, relativistic system administrator Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber

                N Offline
                N Offline
                Nick Parker
                wrote on last edited by
                #7

                Michael Dunn wrote: Aw, but that's no fun! If you really wanna impress, do something like for %a in (*.sql) do type "%a" >> merged.sql Um, I think we definately need a WTL interface to this, it's just too complex. ;P -Nick Parker

                1 Reply Last reply
                0
                • M Michael Dunn

                  Aw, but that's no fun! If you really wanna impress, do something like for %a in (*.sql) do type "%a" >> merged.sql ;) --Mike-- "I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage." -- Chris Maunder, relativistic system administrator Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber

                  B Offline
                  B Offline
                  Bruce Duncan
                  wrote on last edited by
                  #8

                  Show off ;P Though I do use the for command quite often.

                  Searching the web without Google is like straining sewage with your teeth.
                  Userfriendly, 2003/06/07

                  1 Reply Last reply
                  0
                  • M Michael Dunn

                    Aw, but that's no fun! If you really wanna impress, do something like for %a in (*.sql) do type "%a" >> merged.sql ;) --Mike-- "I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage." -- Chris Maunder, relativistic system administrator Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber

                    J Offline
                    J Offline
                    Jorgen Sigvardsson
                    wrote on last edited by
                    #9

                    Whoa! You can do that in Windows? :) -- Now we live in a world of uncertainty Fear is the key - to what you want to be You don't get a say, the majority gets it's way You're outnumbered by the bastards till the day you die...

                    1 Reply Last reply
                    0
                    • M Michael Dunn

                      Aw, but that's no fun! If you really wanna impress, do something like for %a in (*.sql) do type "%a" >> merged.sql ;) --Mike-- "I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage." -- Chris Maunder, relativistic system administrator Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber

                      L Offline
                      L Offline
                      Lunchy
                      wrote on last edited by
                      #10

                      Sweeeeeeet, didn't know you could do that either! And I thought I was good! :-O -Lunchy

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups