i want to read last entered alphanumeric ID from database and add one to its numeric part.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sandhya PatelPosted Jul 11, 2014, 7:52 AM
VulpesPosted Jul 11, 2014, 5:39 AM
Sivaraman DhamodaranPosted Jul 11, 2014, 5:29 AM
ToDo:
1) Take left of the string counting 5 through sub-string manipulation
2) Take Right of the String counting 5, and convert this as number, add 1, convert back to string.
3) Join left and right
Since I do not what DB you are using, I gave the Idea like above
sandhya PatelPosted Jul 11, 2014, 5:05 AM
value is like TPIFP0001
first time i entered it through insert cmnt.
from 2nd onwards i want to read it from table and increment by1
Sivaraman DhamodaranPosted Jul 11, 2014, 4:56 AM
Say for example,
Column Name: Vehicle_Reg_No.
Data:
TN 52 -CJ6656
TN 52 -CJ6657
TN 52 -CJ6658
In the above case you want to increment last portion of Number.
Like the above example, Can you please provide your data. This will help you in getting the answer.