Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any side effects in allowing NULL?
Message
De
01/04/2012 23:29:28
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01539772
Message ID:
01539982
Vues:
66
>>"Magic numbers" are poison. I don't want them anywhere near my code.

If by "magic number" you mean 12/30/1899, I agree with you and Janis that it's better to use some other placeholder to denote absence of value rather than SQL Server's interpretation of a blank date.

The other significant databases (Oracle, MySQL and SQLite) even treat NULL as distinct in a Unique column so it can still be used: SQL Server does not allow this. If there are indeed large databases out there with no NULLs, perhaps being in the MS camp has something to do with it.

FWIW: to my astonishment I recently met a man who had inherited a coin collection comprising old roman coins with a particular interest in gold coins minted by or for Roman Emperors. He had tray after tray of coins with occasional gaps where coins were yet to be located for an emperor or two. Suffice to say that the date on all those coins was well before 1753 and there was a whole tray full of query coins requiring further investigation. 15 years ago it would have been easier to create a database app for those coins using contemporary MS technology than it is today.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform