Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2014
    Posts
    21

    Handling inequalities on records. Is there a standard way to do it?

    Hi everyone. There are situations where a record may have a number value but rather than representing "equal to" it must state "less than" or "greater than". For example, in chemical analysis results below the specified limit of quantitation have to be declared as "less than" like "< 0,5 µg / L".

    This poses a problem. Such inequality can't be expressed in a typical number field, but has to be considered in queries (for example, a query for iron results below 0,5 mg / L should also detect those expressed as "< 0,3 mg / L"). Our database currently stores results as strings so characters like < or > can be displayed. I dislike this because it messes with queries and requires string manipulations and conversions. Right now, I can think of creating a new field which stores the type of statement (<, > or =) so I can evaluate it and proceed.

    I guess this is an issue that has already been dealt with before, so I want to avoid reinventing the wheel or even worse, creating an squared one without noticing. Do you have experience regarding this situation?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Have you considered a lookup table or tables? I'm not sure how I'd handle any arithmetic, but I'm sure it can be done.

    I see a table or tables for various ranges of units of acceptance.
    Code:
    ID    Hi_Lo_range
    
    1     <0,5 mg/L and >0,3 mg/L
    2     <0,3 mg/L and >0,1 mg/L
    ........
    We don't know much about your data, nor the precision involved. If the range is important, then using adequate ids and ranges should work. You could have another field in the table numeric data type with a specific value. If you need multiple ranges, then multiple Acceptance tables with appropriate ranges may apply.

    What exactly do you want to record.
    eg 0,378 mg/L or it is a ID = 1 ???
    Just a few thoughts for consideration.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    symbols definitely cannot be entered into a number field and so you essentially have answered your own question - in that the symbol must go into a separate field. This should represent no obstacle for queries as you can use that symbol as part of the criteria
    < <.5 in two fields ......... will return all records that have the < symbol and all that are .5 or less

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 14
    Last Post: 04-21-2014, 08:08 AM
  2. handling obsolete contact records?
    By LBurns in forum Forms
    Replies: 9
    Last Post: 07-15-2013, 06:56 AM
  3. Handling Records with many Fields
    By Kyle Genova in forum Database Design
    Replies: 4
    Last Post: 07-02-2013, 02:45 PM
  4. Replies: 2
    Last Post: 03-27-2012, 03:53 PM
  5. Standard format for Yes/No fields
    By coolpal9 in forum Forms
    Replies: 1
    Last Post: 01-20-2012, 04:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums