Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Arthur Groen — — source: Usenet: comp.databases.informix
Sorry reply to wrosdng message,
but i found thies two in google.
isn't is all ready in the FAQ ?
#http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&safe=off&selm=6kl3lc%24h
12%241%40news.xmission.com&rnum=8
CREATE PROCEDURE str_to_num (str VARCHAR(20)) RETURNING INTEGER -- or =decimal
DEFINE num INTEGER;
ON EXCEPTION IN (-1213)
RETURN NULL; -- or zero, -99, or whatever suits your application.
END EXCEPTION;
LET num = str;
RETURN num;
END PROCEDURE;
or
#http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&safe=off&th=e01a753aef8c
45c0&rnum=5
And the solution is :
For Character to Numeric:
table1.abc +0 = table2.123
And the other way:
table1.123 || " " = table2.abc
Thanks Cliff
Alex
----- Original Message -----
From: Athumani Mlinga
To: informix-list@iiug.org
Sent: Monday, January 19, 2004 8:42 AM
Subject: Character to Numeric Conversion - IDS 7.2
All,
I have a character field with numeric values but cannot perform any numeric
function unless I convert into numeric type during querying. I s there
anything similar to TO_NUM() function in IDS 7.2 to do this?
Regards,
Athumani.
sending to informix-list
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.