Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Differentiating between 0 and not-entered in numeric fie
Message
From
12/07/2001 09:11:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00529307
Message ID:
00529642
Views:
9
>User is entering 0 (because of someone else's form design) for unknown in statistical data fields, I'm trying to catch which fields are missing data. I'm assuming the obvious solution (since I can't change the coding) is to make the numeric fields accept null values, replace the fields with .null. when I Append Blank and then use isnull() as my criteria for checking for missing ones. I wanted to see if there are other alternatives that I'm not noticing as this solution feels a bit cludgy since I've got other fields that are not numeric types that I will be using the empty() criteria for. Am I making sense, and is this the best solution?
>
>Diana

Diana,
If it's numeric or float you can use isblank(). It doesn't work for int and double. Better is setting null acceptance on.
If user inputs 0 then only way (that I know of) to set it back to blank is 'blank' command (assuming unbuffered and field doesn't accept null where u can't use Ctrl+0).

Null is the way to go because in statistical data 0 has meaning.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform