Subject | Computed Column Exception Handling |
---|---|
Author | sdbeames |
Post date | 2008-06-18T11:13:47Z |
Hi all,
is there a way to handle a tables' computed column exceptions
(within the database) in V1.5 that I've forgotten about?
I want to allow my users to enter a quantity like '10.5 lengths' into
a varchar field, and extract the numeric quantity into another field
for use in calculations.
eg.
alter table ORDER_ITEMS add QTY computed by
(coalesce(cast(F_FINDWORD(QTY_TEXT, 0) as float),0))^
This usually works OK, unless they stupidly enter a non-numeric first,
or forget the space between the number and the words. This will give
me an ISC ERROR CODE:335544334 ISC ERROR MESSAGE:conversion error
from string "dogs"
Just wondering if I can make it return 0 for that column, without
resorting to client-side handling.
Thanks,
Steve
is there a way to handle a tables' computed column exceptions
(within the database) in V1.5 that I've forgotten about?
I want to allow my users to enter a quantity like '10.5 lengths' into
a varchar field, and extract the numeric quantity into another field
for use in calculations.
eg.
alter table ORDER_ITEMS add QTY computed by
(coalesce(cast(F_FINDWORD(QTY_TEXT, 0) as float),0))^
This usually works OK, unless they stupidly enter a non-numeric first,
or forget the space between the number and the words. This will give
me an ISC ERROR CODE:335544334 ISC ERROR MESSAGE:conversion error
from string "dogs"
Just wondering if I can make it return 0 for that column, without
resorting to client-side handling.
Thanks,
Steve