Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Oracle & NULL dates
Message
 
To
06/08/2004 09:57:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00931300
Message ID:
00931392
Views:
19
I think that FoxPro is about the only database that allows us to have both empty dates and null dates. For Oracle (and SQL Server I think) you'd have to come up with some valid date value that's not valid in your business domain. For some, that might be something like 1/1/1900 or for others it may need be a date from long, long ago. The other option is to not use NVL() on the back-end and instead process the NULL values on the client side about the same way you'd have to check for your "dummied" date value. If, for example, your front-end is VFP, you could just select the actual value from the backend (including the NULL values if they are there) and then use VFP's NVL() to evaluate the results and then work with {} or whatever you want on the client side.

Does that make any sense? For example, if you wanted to get rid of the NULL values in the retrieved cursor on the VFP side, after you run your query and get the result you could (in VFP):
* ... retrieve query results into MyCursor here...
UPDATE MyCursor 
  SET start_leave = NVL( start_leave, {} ), 
      end_leave   = NVL( end_leave, {} )
>Hi All,
>
>I'm trying to convert the following query to Oracle. But I don't know how to convert my NULL dates. ( Start_Leave & End_Leave )
>
>...
> NVL(EMP.start_leave, {}) AS start_leave,
> NVL(EMP.end_leave, {}) AS end_leave
>...
Previous
Reply
Map
View

Click here to load this message in the networking platform