db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasvinder S. Bahra" <bbdl21...@blueyonder.co.uk>
Subject Re: Converting a value held in a VARCHAR column into an INTEGER
Date Fri, 12 Mar 2010 13:49:15 GMT
> Since everything is being brought in as a VARCHAR, is there any reason you
> cannot use the .startsWith(") method from the String class?

String.startsWith() may execute faster than Integer.parseInt() (or so I 
assume - logically at least, this seems probable), but I think the 
Interger.parseInt() method is probably the best one to use.  As the data 
value in the varchar column can potentially be made up on 16 characters - 
and any of those characters may be the non-numeric character.

Thanks for the suggestion Annetta.

View raw message