Jump to content

Odd field search


aeroswat

Recommended Posts

I have a field in my database that contains eye information as it pertains to being blind or not. The records can have values like so:

 

CF - Counting Fingers

NIL - Totally blind

 

or the field can have an eye prescription like such

20/200

or 20/20

etc...

 

I want two sql statements

one to be able to pull up the records on people who have any letter acronym or greater than or equal to a 20/200 visual acuity

and another to pull up the records of people who have less than a 20/200 visual acuity

Link to comment
Share on other sites

Well, that doesn't make it simple at all -- fields are free.

 

Regardless, show us all of the versions that you'd like to query.

 

Sorry I read your signature link with the rules  :-\ realize I didn't put the MySQL version in there before. My version says 5.0.81-community

Link to comment
Share on other sites

I think what he means by version is the possible data in that column, i.e. CF, NIL, 20/200, 20/20, etc.

 

In order to query on it, all possible variations must be know.

 

I can say that getting a query to understand greater than/less than on 20/200 is going to be a bit of a pain.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.