Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
How can I update a system (1 record) file value that could be changed by other users? |
Author |
Message |
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-02-26 12:43:25 |
On your SELECT statement, extract the value of the field, lets say MAIN.INV_NO is found to have a value of "247" and you assign it to variable OldInv. Next you would create a variable NewInv and set it to "248", which is the old value plus one, which is what you want to set it to. Then run an UPDATE statement something like:
UPDATE main SET inv_no = :NewInv WHERE inv_no = :OldInv
If the number of rows updated is 1, the update worked. If not, the value changed, retry this entire process again until it works. |
|
|
|
|