The ISNUMERIC function in SQL Server returns a 1 on a field that contains a
single dash character ("-") or a single period character (".")
Anyway, this causes issues, obviously, since a "-" or a "." can't be
converted to a number for use in calculations with other numeric values.
We currently run this check to ensure there are no non-numeric characters
present, except for the dash (negative sign) or period (decimal point):
PATINDEX('%[^0-9.-]%',myField) > 0.
This works just fine. However, I need to modify it somehow to account for
the situation above. Put simply, i want to modify that expression to allow
for a dash or a period, but ONLY if those characters are submitted in
conjunction with at least ONE numeric value.
TIA,
BG
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:336524
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm