Retirement Notice
|
|
User login
|
|
Frontpage Sponsor
|
|
Poll
|
What do you expect from your SI Implementation partner for the success of ERP implementation. Bring best practices - Not to offer more CR's Leveraging standard functions 20% Need more honesty to work with the Users until their processes are fully mapped & Users are trained 40% Focus on process automation/ integrations/ Real time data/ BI analytics 13% Stick to basics 27% Total votes: 15 |
|
|
 |

19th September 2001, 15:05
|
Member
|
|
Join Date: Sep 2001
Location: Singapore - been there done that?
Posts: 49
|
|
Baan: B4C4 SP14 -
DB: Oracle 9.2.0.4 -
OS: Windows Adv Server SP4
|
Baan null date field view from oracle sql
Hi Guys,
Baan date fields are known to be "NOT NULL". If were enter null date in a baan table and viewed it using oracle it will be shown as '01-JAN-99'. How does baan allows us to enter a null date value in a not null date field? How can I perform an insert of a null date from sqlplus? Appreciate if anyone could enlighten this phenomena. Thank you.
Best Wishes,
Zaid
|

19th September 2001, 19:32
|
Senior Member
|
|
Join Date: Aug 2001
Location: Seattle, WA USA
Posts: 172
|
|
Baan: Baan IV, Baan5, A&D extension -
DB: Oracle, MSSQL, Informix -
OS: Unix, NT
|
Baan uses 01-01-9999 as their NULL date in Oracle. So,
insert into baan.ttadvxxx(..., t$date, ...)
values(..., to_date('01-01-9999', 'mm-dd-yyyy'), ...);
|

21st September 2001, 20:51
|
 |
Senior Member
|
|
Join Date: Aug 2001
Location: Lufkin, Texas
Posts: 194
|
|
Baan: Baan IVc4 SP12 -
DB: Oracle 8i, 9i -
OS: AIX 4.3, 5.3
|
Baan null date field view from oracle sql
Oracle will not let you insert the date '01/01/-9999' using SQLPlus or PL/SQL. Oracle will return: ORA-01841: (full) year must be between -4713 and +9999. I asked Oracle support how they thought Baan was getting this date into Oracle and they believed that it was being done through OCI since it doesn't validate dates. There is a flag that can be set in the db_resource file of Baan that will change the Baan NULL date to -4713 instead of -9999, but you would have to convert all date fields over to that value before doing that. The only way I got around this was to create a Baan table with one row in it. That row contains a Baan NULL date that I had Baan populate. Oracle will let you copy the NULL date from that table into the date field of any table you want. Hope this helps.
|

21st September 2001, 22:11
|
 |
Board Master
|
|
Join Date: Aug 2001
Location: Belgium
Posts: 2,184
|
|
Baan: n/a -
DB: n/a -
OS: AIX, HP-UX, Linux
|
OCI
The OCI call interface lets Baan get away with more things than just the NULL date. Another example is the current problem with negative document numbers (t$docn) in tfgld018 on Oracle8 installations. See also: http://www.baanboard.com/baanboard/s...s=&threadid=10
__________________
Regards,
Patrick Van der Veken - Admin & Founder - (c) 2001-2023 baanboard.com/baanforums.com
|

21st September 2001, 22:25
|
Senior Member
|
|
Join Date: Aug 2001
Location: Grand Rapids, MI, USA
Posts: 225
|
|
Baan: Baan IV/5 -
DB: Oracle 7/8/8i,Informix, SQL Server, UDB -
OS: AIX, HP-UX, Tru64, Solaris, NT/2000
|
gguymer is right
Baan does make an OCI call in order to insert the binary date into the field. This has caused some problems for me when doing Oracle replication projects, but we were able to work around the problem.
The methodology described is also correct as far as correcting the problem.
Here are some details from the U7076BUS documentation of the Baan Oracle Database driver:
Driver resource: ora_date
Environment variable: ORA_DATE
Client/Server resource: Set for server only
Type: Integer
Default: 1
Description
This resource indicates the valid date range used by
the Oracle driver. If set to 1 (default) the range is from
01 Jan. 0001 to 31 Dec. 4712. If set to 0, the range will
be 01 Jan. 9999 BC to 31 Dec. 9999. It is
recommended that the default be used; Driver resource ora_date
Environment variable ORA_DATE
Client/Server resource Set for server only
Type Integer
Default 1
Description This resource indicates the valid date range used by
the Oracle driver. If set to 1 (default) the range is from
01 Jan. 0001 to 31 Dec. 4712. If set to 0, the range will
be 01 Jan. 9999 BC to 31 Dec. 9999. It is
recommended that the default be used; the range
allowed with the value 0 will not be supported in future
BaanERP releases because the date range cannot be
handled by non-Baan programs.
-------------------------
It is important to eliminate the old date format as ERP 5.0c no longer supports the old -9999 BC start of epoch. It also does not use the OCI binary date insert. So, if you are on ERP get rid of it.
If you are on Baan IV, you can live with it depending on your use of advanced Oracle features or third-party applications.
-- Jim
__________________
Jim VanderMey
VP of Technical Operations
Open Systems Technologies
Grand Rapids, Michigan, USA
jvandermey@ostusa.com
|

22nd September 2001, 01:14
|
Senior Member
|
|
Join Date: Aug 2001
Location: Seattle, WA USA
Posts: 172
|
|
Baan: Baan IV, Baan5, A&D extension -
DB: Oracle, MSSQL, Informix -
OS: Unix, NT
|
I said "Baan uses 01-01-9999 as their NULL date in Oracle." Where did all this 01/01/-9999 come from?
|

23rd September 2001, 03:14
|
Member
|
|
Join Date: Sep 2001
Location: Singapore - been there done that?
Posts: 49
|
|
Baan: B4C4 SP14 -
DB: Oracle 9.2.0.4 -
OS: Windows Adv Server SP4
|
gguymer is right
I've create a table with one field as select from the baan table field which contains the null date presumel seen as '01-JAN-9999'.
Alter the PL/SQL procedure to select from this table. It worked perfectly!
High Five! to all who contirbuted to this.
Best Wishes,
Zaid
|

24th September 2001, 16:23
|
 |
Senior Member
|
|
Join Date: Aug 2001
Location: Lufkin, Texas
Posts: 194
|
|
Baan: Baan IVc4 SP12 -
DB: Oracle 8i, 9i -
OS: AIX 4.3, 5.3
|
Baan Null Dates
Quote:
Originally posted by gfasbender
I said "Baan uses 01-01-9999 as their NULL date in Oracle." Where did all this 01/01/-9999 come from?
|
It is meant to highlight the fact that the Baan NULL date in Oracle has a negative year. You can format dates any way you want, but yours does not show that the date is negative. Your format uses a dash as a separator, and mine uses a foward shash as a separator with a dash next to the year indicating it as a negative number. If you will use this Oracle format mask, 'MM/DD/SYYYY' in the TO_CHAR funtion, it will display the date the same as I orignally posted it showing the sign of the year.
|

19th June 2006, 09:43
|
 |
Member
|
|
Join Date: Mar 2006
Posts: 30
|
|
Baan: BAAN 6.1 LN FP2 -
DB: SQL -
OS: window 2003
|
How to find out the Null date from the database
Gurmeet Singh
|

21st June 2006, 18:13
|
Junior Member
|
|
Join Date: Feb 2005
Posts: 8
|
|
Baan: BaaN IV c4, SP 6 and additional weekly dumps -
DB: Oracle 8.0.5 -
OS: HP UX 11.0
|
How to Find out the Not Null, Not empty but least Date from Database
I know the following two possibilities to compare such dates in Oracle:
select ...
from ttimjr913...
where T$exdat < to_date('01.01.0001','DD.MM.YYYY')
or
select ...
from ttimjr913...
where T$exdat = least(T$exdat)
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|