Skip navigation links

MySQL Forums :: General :: Casting String to Integer


Advanced Search

Casting String to Integer
Posted by: Aunts S ()
Date: December 11, 2005 09:57AM

Hey,

in the database there is a field ktnr as String, but ktnr should only be Integer!

if i create a new table with ktnr INTEGER and load the data, there will be a mistake, if ktnr includes not only integer values :-( For example: "123456e"

How can i solve the problem?

1. How can i convert String to Integer and conclude the exception cases into the query!?

OR

2. How can i start the database (or write the query) such waz, that in exception case there won´t be a brealk!?

Thanks

Options: ReplyQuote


Subject Written By Posted
Casting String to Integer Aunts S 12/11/2005 09:57AM
Re: Casting String to Integer Mohamed Mansour 12/11/2005 12:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.