Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    39

    Unanswered: 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 -

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    Join Date
    Jun 2004
    Posts
    39
    I've find some stuff bu nothing that match exactly my problem.
    geoffrey
    - Four J's Development Tools -

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I'm surprised it worked in v7. I don't believe you can assign a DATE to a TIMESTAMP. Try using TIMESTAMP function.

  5. #5
    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 -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •