Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

Retirement Notice

Baanboard is shutting down on 31-dec-2023. See: http://www.baanboard.com/baanboard/showthread.php?t=76043


User login

Frontpage Sponsor

Main

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

Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 19th September 2001, 15:05
zaidlaz zaidlaz is offline
Member
 
Join Date: Sep 2001
Location: Singapore - been there done that?
Posts: 49
zaidlaz is on a distinguished road
Baan: B4C4 SP14 - DB: Oracle 9.2.0.4 - OS: Windows Adv Server SP4
Question 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
Reply With Quote
  #2  
Old 19th September 2001, 19:32
gfasbender gfasbender is offline
Senior Member
 
Join Date: Aug 2001
Location: Seattle, WA USA
Posts: 172
gfasbender is on a distinguished road
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'), ...);
__________________
Gordon Fasbender
GW Consulting
Reply With Quote
  #3  
Old 21st September 2001, 20:51
gguymer's Avatar
gguymer gguymer is offline
Senior Member
 
Join Date: Aug 2001
Location: Lufkin, Texas
Posts: 194
gguymer is on a distinguished road
Baan: Baan IVc4 SP12 - DB: Oracle 8i, 9i - OS: AIX 4.3, 5.3
Smile 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.
Reply With Quote
  #4  
Old 21st September 2001, 22:11
patvdv's Avatar
patvdv patvdv is offline
Board Master
 
Join Date: Aug 2001
Location: Belgium
Posts: 2,184
patvdv will become famous soon enough
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
Reply With Quote
  #5  
Old 21st September 2001, 22:25
JamesV JamesV is offline
Senior Member
 
Join Date: Aug 2001
Location: Grand Rapids, MI, USA
Posts: 225
JamesV is on a distinguished road
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
Reply With Quote
  #6  
Old 22nd September 2001, 01:14
gfasbender gfasbender is offline
Senior Member
 
Join Date: Aug 2001
Location: Seattle, WA USA
Posts: 172
gfasbender is on a distinguished road
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?
__________________
Gordon Fasbender
GW Consulting
Reply With Quote
  #7  
Old 23rd September 2001, 03:14
zaidlaz zaidlaz is offline
Member
 
Join Date: Sep 2001
Location: Singapore - been there done that?
Posts: 49
zaidlaz is on a distinguished road
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
Reply With Quote
  #8  
Old 24th September 2001, 16:23
gguymer's Avatar
gguymer gguymer is offline
Senior Member
 
Join Date: Aug 2001
Location: Lufkin, Texas
Posts: 194
gguymer is on a distinguished road
Baan: Baan IVc4 SP12 - DB: Oracle 8i, 9i - OS: AIX 4.3, 5.3
Smile 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.
Reply With Quote
  #9  
Old 19th June 2006, 09:43
gurmeetmakkar's Avatar
gurmeetmakkar gurmeetmakkar is offline
Member
 
Join Date: Mar 2006
Posts: 30
gurmeetmakkar is on a distinguished road
Baan: BAAN 6.1 LN FP2 - DB: SQL - OS: window 2003
How to find out the Null date from the database


Gurmeet Singh
Reply With Quote
  #10  
Old 21st June 2006, 18:13
PeterM PeterM is offline
Junior Member
 
Join Date: Feb 2005
Posts: 8
PeterM is on a distinguished road
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)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ervaren Baan specialist ICT Builder Jobs and Resumes 3 5th February 2005 07:37
Service module in Baan en@frrom Project & Services 6 12th September 2003 10:48
Baan on Oracle Guru for Hire Will travel OracleBaanGuru Jobs and Resumes 1 19th June 2002 16:57
BSP-US (LLC) added as a Baan Education Alliance svandenh General Discussion & Chat 1 20th August 2001 20:44


All times are GMT +2. The time now is 01:02.


©2001-2023 - Baanboard.com - Baanforums.com