Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a table with values from the same table...

Status
Not open for further replies.

Menthos

IS-IT--Management
Apr 14, 2003
24
0
0
GB
I'm sure this is possible, probably with a sub-query... I want to update a record with a value from another record in the same table.

E.G.
Code:
Name     Val_1     Val_2    Check_col
Test1    0         0        s
Test1    10        20       M
Test2    0         0        s
Test2    20        25       M

So the query would replace the Val_1 value for the record where Check_col="s" with the corresponding Val_1 where Check_col="M"

Cheers,
Menthos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top