How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Ingo U Your Own Question
Ingo U
Ingo U, Software Engineer
Category: Programming
Satisfied Customers: 755
Experience:  Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
Type Your Programming Question Here...
Ingo U is online now
A new question is answered every 9 seconds

I have the following query (it works) but I desperately need

Customer Question

Hi there,
I have the following query (it works) but I desperately need to know how to use it to update my original data set with the results. Any help would be greatly appreciated!
Apparently - I am also blocked from attached the code here. So - query works - but how the heck do I get it to update the data in my original table?
Submitted: 10 months ago.
Category: Programming
Expert:  Ingo U replied 10 months ago.


I hope I can help you out - could you please upload your SQL script file (e.g. at , or just copy/paste the text in this thread?

I'd like to have a look.


Customer: replied 10 months ago.
See attached. Query works. We just don't know how to update our original database with the results?
Customer: replied 10 months ago.
Any luck? Please get back to me as soon as possible.
Expert:  Ingo U replied 10 months ago.


Generally, you'd use an update statement to change some or all columns in some or all rows of your table; but I image you've seen that.

With the mild complexity of your query batch (2 separate statements? ) I'd have to see your source table definition (schema & sample data) and the actual output from your query to assemble an update statement. BUt in all likelihood, you'll need a form of the UPDATE ... SELECT pattern, check this out: