Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REPLACE WITH NULL (??)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00254209
Message ID:
00254298
Views:
25
My mistake, I forgot them in this example, but they *were* in my code that wasn't working. I worked around the problem though. For some reason the statement below (with dots surrounding the NULL) wouldn't work for me. I had to add a variable, set it to .NULL. and use it in the replace statement.

ie.

*========================================
ldDateTime = .NULL.

REPLACE CompleteDate WITH ldCompleteDate
*========================================

As per your suggestion, I'm still considering adding the flag field though.

Thanks for your help!


>>*=============================
>>REPLACE CompleteDate WITH NULL
>>*=============================
>>

>
>It looks like you're missing the dots around NULL in your code. So, your code should read:
>
>replace CompleteDate with .NULL.
>
>This will only work, of course, if you've defined the field as accepting null values.
>
>One caution about using nulls, you'll find that the typical tests for the values in fields will not be accurate, and you'll constantly have to be using ISNULL() to test for null values. So, in the case of your date field, you'd have to say ISNULL('CompletedDate') or empty('CompletedDate'). You might find a flag easier to deal with.
Previous
Reply
Map
View

Click here to load this message in the networking platform