Solved

MS Access - Unlimited or Infinity

Posted on 2004-03-28
6
820 Views
Last Modified: 2008-03-06
Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
0
Comment
Question by:geekhelp
6 Comments
 
LVL 2

Expert Comment

by:eric_duncan
ID: 10701309
My understanding is that the number field has to have either a discrete value or null. I have seen other people solve this issue by "reserving" a specific value that will be used to indicate infinity - this is often the upper bound of the number field or a null value. The advantage of using null, if you don't need it otherwise, is that mathematical operations using null closely resemble mathematical operations using inifinity because the result is always null.

Let me know if this helps!

eric
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 10701406
>>Is there a way or symbol that can be entered into a number field to represent infinity or unlimited in a Microsoft Access database??
The simplest way is to assign an 'impossible' value as Default to the number field to represent the 'infinity' or 'unlimited' value, like put a value of -1 in your field's Default value ?
0
 
LVL 2

Expert Comment

by:Carlovski
ID: 10703739
Eric is right,
Database nulls, and infinity do share many properties, but using a Null is likely to really confuse people who aren't used to databases, or mathematics!
Also, the properties that they do share, may not be want you want (i.e nothing is ever equal to eiher Null or infinity, even null or infinity!)
The safest thing may be to hold if it is infinite value in a separate field (Being picky, numeric fields should hold discrete values)
What exactly are you trying to record?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:geekhelp
ID: 10721508
The field is for a Doggy Daycare database - It keeps track of how many "available passes" the dog owner has on their account. When a dog is "Checked in" to our facility a pass is automatically deducted from this field.
Owners can purchase a monthly unlimited pass and I am trying to figure out how I can represent this in the database, so that it stays the same even when the field has 1 subtracted from it. Thanks
0
 
LVL 2

Accepted Solution

by:
eric_duncan earned 250 total points
ID: 10722752
There isn't any way you can make the database handle this situation automatically - you are going to have to use some application logic to figure out whether or not someone has an unlimited pass or not. Probably the easiest way to do that would be to add a Boolean field to the table to track whether or not someone has unlimited passes on their account and then check this value in your application logic.

Eric
0
 

Author Comment

by:geekhelp
ID: 10729256
Thank You all who helped reach this conclusion!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction: Often, when running a query with joins, the results show up "duplicates", and often, those duplicates can be "eliminated" in the results using DISTINCT, for example. Using DISTINCT is simple: just add it after the SELECT keyword, an…
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now