Subject | Re: [firebird-support] String to Integer |
---|---|
Author | Ann W. Harrison |
Post date | 2006-09-27T14:24:56Z |
Helen Borrie wrote:
happily translates strings containing numbers with US markup
characters like -123 1.23 and 123,456. Leading spaces seem
to be OK too.
SQL> show table t2;
F1 INTEGER Nullable
F2 VARCHAR(10) Nullable
SQL> select * from t2;
F1 F2
============ ==========
<null> 124
<null> 1.24
<null> -125
<null> 123,456
SQL> insert into t2 (f2) values (' 1243');
SQL> update t2 set f1 = f2;
SQL> select * from t2;
F1 F2
============ ==========
124 124
1 1.24
-125 -125
123456 123,456
1243 1243
> are you sure your strings don't contain any leading or in-line blanksHelen meant *extraneous* commas, minus, signs and dots. Firebird
> or other alpha characters like hyphens, decimal points, dollar signs,
> commas and so on?
>
happily translates strings containing numbers with US markup
characters like -123 1.23 and 123,456. Leading spaces seem
to be OK too.
SQL> show table t2;
F1 INTEGER Nullable
F2 VARCHAR(10) Nullable
SQL> select * from t2;
F1 F2
============ ==========
<null> 124
<null> 1.24
<null> -125
<null> 123,456
SQL> insert into t2 (f2) values (' 1243');
SQL> update t2 set f1 = f2;
SQL> select * from t2;
F1 F2
============ ==========
124 124
1 1.24
-125 -125
123456 123,456
1243 1243