I also find the leading space after converting the sequence to a character!?
I thought that if the empID in the table is a NUMBER datatype it may be better to explicitly cast the generated key value into a NUMBER. Any error generated when trying to convert to number could be handled in an exception and then calculate and return a valid number - also perhaps it is uneccessary to declare the local variables and we could then make only one call to the SQL engine;
[ March 31, 2008: Message edited by: Craig Collins ]
Joined: Mar 30, 2008
From the oracle docs,
Oracle uses blank characters to fill format elements to a constant width equal to the largest element for the relevant format model in the current session language.
I'm guessing to accomodate the (possible) minus sign oracle pads the 4 digit format model to 5 characters!