Hi all.
I need to test whether the first bit of a field is numeric.
For example, the field might contain:
154 boxes
I'm currently testing it by doing:
if(abs(left(field,locate(' ', field))>0),'Numeric bit at front', 'Not
Numeric bit at front')
It seems to work.
Well it kinda works. If 'field' has '3a5 boxes' in it, the above
function would return true, as the abs('3a5') would equate to 3. But
it's good enough for now.
Is there a simpler / better way of doing it? I can't find any reference
to a function like isnumeric().
Feature request? It would be handy. It would also add to compatibility
with other DB servers...
--
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dk****@nusconsulting.com.au
website: www.nusconsulting.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw