Hi,
If new employee need to insert the following columns:
No_Of_tries=1
Pro_Id = ID
OriPro_Id = Null
If existing employee need to Update the following columns :
No_Of_tries= No_Of_tries+1
Pro_Id = ID
OriPro_Id = Prev_ID
How to update the table by incrementing the value , can you please suggest...
How to increment the value in Database while updating table
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 13
- Joined: Thu Dec 02, 2010 2:55 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
This kind of problem is usually solved with stage variables, whose derivation expressions can include If..Then..Else logic and which can be given initial values.
For example svNoOfTries might be derived as
Of course, I do not know your business logic for "new employee", but I'm sure that such must exist.
This kind of problem is usually solved with stage variables, whose derivation expressions can include If..Then..Else logic and which can be given initial values.
For example svNoOfTries might be derived as
Code: Select all
If svNewEmployee Then 1 Else svNoOfTries + 1
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 13
- Joined: Thu Dec 02, 2010 2:55 am