aeroswat Posted December 15, 2009 Share Posted December 15, 2009 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 Quote Link to comment Share on other sites More sharing options...
fenway Posted December 15, 2009 Share Posted December 15, 2009 Why does the field have arbitrary content? Why no multiple fields? Quote Link to comment Share on other sites More sharing options...
aeroswat Posted December 15, 2009 Author Share Posted December 15, 2009 Why does the field have arbitrary content? Why no multiple fields? Because I'm trying to reduce the checks for simple display on some of these fields. Plus I already have a good 20 fields for each record. I'm trying to keep it as simple as possible. Quote Link to comment Share on other sites More sharing options...
fenway Posted December 15, 2009 Share Posted December 15, 2009 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. Quote Link to comment Share on other sites More sharing options...
aeroswat Posted December 15, 2009 Author Share Posted December 15, 2009 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 Quote Link to comment Share on other sites More sharing options...
josborne Posted December 15, 2009 Share Posted December 15, 2009 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.