I have a problem that i can´t solve :(
I execute this sql statement to get the max of a the CCID-String:
"select MAX(CCID) as test123 from "
+ tabelleName+ " where CCID like 'W%'");
After that I want to increase the string. I substring the W and convert the string to an int:
String ccid = rs.getString("test123");
String test = ccid.substring(1,6);
int id = Integer.parseInt(test);
int newid = id+1;
At the moment the max(ccid) looks like W01352. The result of newid is "1353" without the "W0".
I want to get a string like W01353 that I could add to the db2-database for the next W-Number.
Do someone have any idea?
Sorry for my not so perfect english ;)
Thank u.