[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Check for NUMERIC in field.
This is a Sybase DB. The field is a 3 byte character
field.
I need to differentiate if the value is numeric versus
alpha.
123 vs. ABC
-np
--- Larry Roux <LRoux@syr.edu> wrote:
> The problem with the below is that it automatically
> forces a table scan. If the table you are selecting
> on is large this could be a problem.
>
>
> ******************************
> Larry Roux
> Syracuse University
> lroux@syr.edu
> *******************************
>
> >>> GJANSEN@aflcio.org 02/24/03 11:33AM >>>
> Depends on your DB, I guess. In Oracle I've done
> this (for integers)
> with
>
> WHERE rtrim(tab.field, '0123456789') IS NULL
>
> If you want to handle reals, that would be a little
> more code. I'd be
> inclined either to set up a package to bust strings
> into tokens, or else
> to see what I could do with the supplied package
> OWA_PATTERN.
>
> >>> nehal_h_patel@yahoo.com 02/24/03 10:51AM >>>
> How can I check if a value is numeric to query on as
> noted below :
>
> select *
> from <table>
> where <table>.field IS numeric
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users