Re: Weird Query



Maxim,
let's suppose I was wondering how much money I have on my checking
account.
1. I didn't know, that's NULL.
2. I went to an ATM and run a query, Let's suppose I've got $100
3. I'd withdrawn $100 from the account and my receipt said I had $0.00
remaining balance.

Don't tell me that after step 3 account_balance "has no value" - it
does! The value IS known - $0.00. There is a big difference between a
known zero value and an unknown value.

Similarly, there is a big *practical* difference between a known zero
length string and an unknown string. I have given you a very simple
real life example when it is important.

>> to be able to
distinguish these cases you need to introduce new entity , ( e.g.
nation
), one of those attribute can be "middle name allowed" and create a
relationship between that 2 entities.
<<
I don't need any 'zero balance allowed' column to distinguish between
steps 1 (unknown balance) and 3 (zero balance). Besides, in many
countries, such as United States middle names are optional, not
mandatory. Since a middle name is a personal choise, I don't think your
suggestion would help.

BTW, other RDBMS will let me to distinguish between an empty string and
an unknown one. MS SQL Server:

create table t(i int, c varchar(10))
insert into t values(1, '')
insert into t values(2, null)
select * from t where c=''

i c
----------- ----------
1

What do you think?

.



Relevant Pages

  • Re: String Concatenation
    ... null, it means the data is missing, could be that the middle name is unknown. ... If it's a zero length string it means the person doesn't have a middle name. ... The only problem is that nulls are indistinguishable from zero length strings to the human eye. ...
    (comp.databases.ms-access)
  • Re: Error 3122 You tried to execute a query that does not include
    ... A zero length string is NOT the same as NULL. ... The string constant "" ... other hand, means "this field is undefined, unknown, it could be ...
    (microsoft.public.access.queries)
  • Re: Two problems sending an E-mail for Outlook 2007 and VB 2005
    ... I'd suspect that you aren't getting a valid Account object, I've used SendUsingAccount with valid Account objects with no problems, although reading that object property only works right in a Send event. ... Dim WordContent As String ... Dim SendPersonName As String ...
    (microsoft.public.outlook.program_vba)
  • Re: Testing Platforms
    ... I think that most of us would just run a separate account on the main ... String "q" ... programming changes relating to data entry screens, report formatting, ... we are current on our support contract) has run hot and cold. ...
    (comp.databases.pick)
  • Re: using multiple locations (network drives) for recorded TV
    ... I have a linksys MCX, ... MCE only needs to continue to record to the standard ... > understand holds more than one string. ... > research I found implied you need to do this for the SYSTEM account not ...
    (microsoft.public.windows.mediacenter)