Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8669703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:32:29+00:00 2026-06-12T18:32:29+00:00

Possible Duplicate: Is it possible to perform multiple updates with a single UPDATE SQL

  • 0

Possible Duplicate:
Is it possible to perform multiple updates with a single UPDATE SQL statement?

I am updating a table with some new values for a particular column as below, so i am updating table Prepay, column PrepayTransactionDesc, on certain fows indicated by prepayId

update Prepay
set PrepayTransactionDesc = 'Funded Repeat Voucher 153429'
where prepayId = 58045

It works fine, but i want to do multiple updates.
I have tried a few different ways but failed. the was i was trying to do it was using CASE when and then.

for instance, i have the following prepayid and prepaytransactiondesc fields

57770   Funded Repeat Voucher 153118
57771   Funded Repeat Voucher 153119
57772   Funded Repeat Voucher 153120
57773   Funded Repeat Voucher 153121
57774   Funded Repeat Voucher 153122
57775   Funded Repeat Voucher 153123
57776   Funded Repeat Voucher 153124
57894   Funded Repeat Voucher 153276
57895   Funded Repeat Voucher 153277
57896   Funded Repeat Voucher 153278

How would i do them in 1 go? It cant be that difficult but i seem to be missing something when i try to do the task.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:32:30+00:00Added an answer on June 12, 2026 at 6:32 pm

    You could try

    UPDATE Prepay
    SET PrepayTransactionDesc = 
       CASE
         WHEN prepayID = 57770 THEN 'Funded Repeat Voucher 153118'
         WHEN prepayID = 57771 THEN 'Funded Repeat Voucher 153119'
         WHEN prepayID = nextID THEN 'Next Value' 
       END
    WHERE  prepayID in (1,2,4,57770... all your ids here)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Multiple INSERT statements vs. single INSERT with multiple VALUES Im doing some
Possible Duplicate: Mysql: Perform of NOT EXISTS. Is it possible to improve permofance? Is
Possible Duplicate: How do I perform a Perl substitution on a string while keeping
Possible Duplicate: How do you perform string replacement on just a subsection of a
Possible Duplicate: Java operator overload In c++, we can perform the operator overloading. But
I've got a report that includes some limited duplicate information, there are multiple dates
Possible Duplicate: Mysql can't perform more than 1 query at a time $query =
Possible Duplicate: What is the “??” operator for? What does the ?? operator perform
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: How can I get jQuery to perform a synchronous, rather than asynchronous,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.