Solved

combining Microsoft SQL queries

Posted on 2013-12-28
6
257 Views
Last Modified: 2013-12-28
I need to combine about 12 queries into 1, so I can update about 100 databases faster.  The queries are attached.

THanks
Run-in-query-analyzer-4-4-5.zip
0
Comment
Question by:indyit
  • 3
  • 2
6 Comments
 
LVL 11

Expert Comment

by:Technodweeb
ID: 39743791
Can you explain what you mean by combine them? SQL Queries should be able to be appended to each other and run all at one time. They will run asynchronously one after the other. The next one will not run until the previous one finishes. Is this what you mean?
0
 
LVL 13

Expert Comment

by:AielloJ
ID: 39743795
indyit,

With the number of different tables involved, getting it into 1 query isn't going to happen.  Can you tell me more about what you're trying to accomplish?  Why are there 100 databases all requiring the same information?  Are these databases on a common network?

AielloJ
0
 

Author Comment

by:indyit
ID: 39743812
essentially I just need to be able to 'manually' run this query on each database that is updating a software package with a 'new' version.  it doesn't mater if they run sequentially or not...as long as I physically don't have to keep selecting the next query to get the database updated.  onnce it starts to run I can move on to the next database.  this is how I normally do it, but my SQL guy is not available
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:indyit
ID: 39743822
Is this something someone can physically do?  combine the queries and email me the query?
0
 
LVL 11

Accepted Solution

by:
Technodweeb earned 500 total points
ID: 39743874
They are only text files...

unzip them all into a single folder called c:\batch\
run the command Copy c:\batch\*.sql c:\batch\OneBigQuery.sql

This will combine all files into one for you and you are all set.

MAKE GOOD BACKUPS OF YOUR DATABASES BEFORE YOU DO THIS...
0
 

Author Closing Comment

by:indyit
ID: 39743931
wow simple and elegant....simple for you , but a real solution for me...

Thanks!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now