× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, Folks:

I have a column (fooCol) in a table (footab) that contains string data
looking like the following:
'961 6'
'2809 6'
'67 6'
'66 6'
'2879 6'
'2874 6'

(No, the second set is not always 6. This is a column that was loaded
incorrectly due to lack of a comma at the source end, and I'm trying to find
an efficient way to live with it (longer story)).

I have need of *efficiently* returning the first set of digits and the
second set of digits as separate numeric values, so that they may be used in
an UPDATE or INSERT statement or embedded SQL where the result is numeric.

Any ideas? I thought of using something like select left(foocol, instr(' ',
foocol)) (which is mySQL syntax) for the "left number", but I couldn't find
an instr equivalent and, even if I did it'd still be a string value. The
second set would probably be a no-brainer after landing on a solution for
the first.

Thanks for any pointers.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"All progress is based upon a universal innate desire on the part of every
organism to live beyond its income."
-- Samuel Butler


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.