Re: String to number conversion
Lukasz Misztal <[email protected]> Tue, 19 Jun 2007 20:03:06 +0200
| Newsgroups | gmane.comp.db.maxdb |
|---|---|
| Message-ID | <[email protected]> |
Dusan, try to create own function, for basic example: CREATE FUNCTION GETASNUMERIC (s1 VARCHAR) RETURNS NUMERIC AS IF UPPER(s1) = LOWER(s1) THEN RETURN NUM(s1) ELSE RETURN null; It is probably only way to do this. Best regards, Lukasz > Hello, > I want to convert Varchar ASCII column to Integer data type. > When I'm using NUM () function and my string column contains characters >that cannot be interpreted as a numeric value > statement returns me an error. > Is it possible to convert chracters to numbers, while entries that > cannot be interpreted as a numeric values will be null ?? > Thanks Dusan -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[email protected]