I am new to Smart Notification and am writing a query that returns a date field where some of the dates are not populated. I am using a JDBC connection against an Oracle 10 database.
The records with the blank dates are returned to the infoset as 1/1/1700. I know when I run the query directly in SQLPlus, that tool returns the date as 1/1/2000, but I know that in Lawson the date is unpopulated.
When I write the Notification, I see the 1/1/1700 populating there as well. Is there a way that I can have these dates show up as blank in the Smart Notification?
Thanks!
SELECT nvl(date_field,null) FROM table
CASE WHEN datefield = TO_DATE(1700,01,01, 'yyyy-mm-dd) THEN null ELSE datefield'
I agree with Matt—the best way to do this would be with SQL. However, you can write your select using a decode statement to make it a little more efficient: e.g. using EMPLOYEE table and term_date: decode(emp.term_date,'01-JAN-1700',null,emp.term_date) as term_date
Keep in mind that Lawson always stores null dates in Oracle as Jan. 1, 1700.