View previous topic :: View next topic |
Author |
Message |
dsonsamuel Beginner

Joined: 25 Mar 2004 Posts: 26 Topics: 16
|
Posted: Thu Feb 09, 2006 9:39 am Post subject: Cast Char to Int???? |
|
|
Hi,
How can i cast a Char field in a table to integer type?Any thots?
regards,
dson. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
dsonsamuel Beginner

Joined: 25 Mar 2004 Posts: 26 Topics: 16
|
Posted: Thu Feb 09, 2006 1:54 pm Post subject: |
|
|
Hi,
My concern is...
I have a amount fields in the table as 2, and 2,03 (CHAR 15)
I want to select the amount which exceeds a decimal amt limit for example 2 whcih is in working storage.
When I used cast(amt as decimal) it returned just the whole part which fails when the amt is 2,03 and limit is 2.
Is there any other solution to concert 2,03(char) to 2.03(Integer) and then do a compare with the limit 2? |
|
Back to top |
|
 |
Mervyn Moderator

Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Fri Feb 10, 2006 5:51 am Post subject: |
|
|
Would it be easier to cast the number to char? _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Feb 10, 2006 10:11 am Post subject: |
|
|
dsonsamuel,
please show us examples of both input and desired output
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|