i have a simple question
i need a sql statement that will replace all '950' to '1' and all '957' to 2 in my Model column of the BlackBerry table.
Please advise the code
UPDATE BlackBerry SET Model = '1' where Model = '950';
then...
UPDATE BlackBerry SET Model = '2' where Model = '957';
I don't believe it can be done in one SQL statement, unless you wanted to go VBA...
Set dbsThis=currentdb
Set rstBerry = dbsThis.OpenRecordset("BlackBerry"
With rstBerry
Do Until .EOF
Select Case .Fields("Model"
Case Is '950'
.Edit
.Fields("Model"=1
.Update
Case Is '957'
.Edit
.Fields("Model"=2
.Update
End Select
.Movenext
Loop
End With
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.