If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Difference between V7 and V8 DATE & TIMESTAMP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-04, 11:54
geoffrey geoffrey is offline
Registered User
 
Join Date: Jun 2004
Posts: 39
Difference between V7 and V8 DATE & TIMESTAMP

On SunOS with DB2 V7.1, the following SQL command works fine :
INSERT INTO dbit1 ( dbit1_key, dbit1_dt, dbit1_dta ) VALUES ( 1, d1, d2 )

dbit1_key TYPE INTEGER
dbit1_dt TYPE DATE
dbit1_dta TYPE TIMESTAMP

d1 and d2 are DATE
d1 : 12/24/2001
d2 : 11/14/1989

With DB2 V8.0 (no fixpack), it gives me the following error :
SQL statement error number -6372 (-301).
[IBM][CLI Driver][DB2/SUN] SQL0301N The value of input host variable or parameter number "" cannot be used because of its data type. SQLSTATE=07006

Any idea ?
__________________
geoffrey
- Four J's Development Tools -
Reply With Quote
  #2 (permalink)  
Old 07-06-04, 11:56
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Did you look for APAR's included in any of the 6 fixpaks for version 8 that have been released. The base code is usually a bit buggy.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 07-06-04, 12:09
geoffrey geoffrey is offline
Registered User
 
Join Date: Jun 2004
Posts: 39
I've find some stuff bu nothing that match exactly my problem.
__________________
geoffrey
- Four J's Development Tools -
Reply With Quote
  #4 (permalink)  
Old 07-06-04, 13:06
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I'm surprised it worked in v7. I don't believe you can assign a DATE to a TIMESTAMP. Try using TIMESTAMP function.
Reply With Quote
  #5 (permalink)  
Old 07-08-04, 05:37
geoffrey geoffrey is offline
Registered User
 
Join Date: Jun 2004
Posts: 39
I should have be more specific about. It works when I throw the SQL statement througth a 4GL application.

So the problem should rather come from here, from the DVM used to run the application.
__________________
geoffrey
- Four J's Development Tools -
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On