Advertisement

11.02.2006 at 11:40AM PST, ID: 22047057
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Combing Updates and Inserts in SQL Queries

Asked by onsite_tech in MS SQL Server

Tags: , , , ,

Hopefully this will be a quick one.  I'm not really a database guy, i'm more in the app/dev side of things and am learning SQL just for this project.  I have a script that updates a table in my database with new values that it pulls down from a server in our enviroment.  The script basically takes all of the rows of data from the server and inserts them (one at a time) into the database.  This means that normally, i end up doing 40-60 inserts into the database for each server i pull information from.  I've modified my code to do a quick query against the DB to see if the row i'm inserting already exists, and then i have vbscript perform an update or an insert based on the rowcount i get back.  The system works fine right now but there is a latency issue i'm becoming concerned with where i'm having to do two queries for each row i want to insert/update and while each query takes less then a second to run, it adds up and ends up being a minute or more per server i talk to just to push this information into the database.  This adds up when i have to hit a few hundred servers with this script every day.

So my question is, is there a way via SQL itself to do a smart update/insert into the database and/or is there a better way to do an insert of several rows of data without having to do a loop in vbscript with each row being its own query.  Any ideas?

Also, in addition to the above, i'm trying to come up with a way to track the updates/inserts that happen to these rows intellegently (so we can log when a row was changed and what field was changed on it).  is there a proper way to do that in SQL that anyone is aware of?  Maybe something like updating the new data into a seperate temp table and comparing the two tables via SQL (is that even possible)?  thanks in advance everyone,Start Free Trial
 
Loading Advertisement...
 
[+][-]11.02.2006 at 11:46AM PST, ID: 17860920

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.02.2006 at 11:52AM PST, ID: 17860987

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.02.2006 at 12:04PM PST, ID: 17861091

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.02.2006 at 02:15PM PST, ID: 17862397

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.02.2006 at 03:13PM PST, ID: 17862808

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.06.2006 at 02:47PM PST, ID: 17885496

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.06.2006 at 02:54PM PST, ID: 17885528

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.07.2006 at 07:24AM PST, ID: 17890054

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.07.2006 at 07:26AM PST, ID: 17890075

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.07.2006 at 08:52AM PST, ID: 17890934

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.07.2006 at 11:04AM PST, ID: 17891997

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.07.2006 at 11:09AM PST, ID: 17892033

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.07.2006 at 11:16AM PST, ID: 17892084

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: combing, sql, server, field, query
Sign Up Now!
Solution Provided By: rw3admin
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11.07.2006 at 12:53PM PST, ID: 17892874

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.07.2006 at 12:58PM PST, ID: 17892914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44