Say I have this table schema.
ID
AccNo
Amount
Say I have this data
ID AccNo Amount
1 1020 100.00
2 2040 50.00
How do I write a TSQL update query to update AccNo 1020 amount column with the amount from 2040??
Malcolm
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Use a nested select:
Obviously if your condition is different, you’ll have to tweak to suit, e.g. if AccNo is unique, you can use that.