Re: Problem with TO_DATE from PRO*C (gives error 904)

From: Jeff Cerrafon <cerrafon_at_iconz.co.nz>
Date: 5 Jan 1995 07:51:20 GMT
Message-ID: <3eg8do$kee_at_status>


Jan Olav Eide (jan-olav.eide_at_noner.abb.telemax.no) wrote:

: EXEC SQL BEGIN DECLARE SECTION
: char datestr[30];
: EXEC SQL END DECLARE SECTION
 
: strcpy(datestr,"17-12-1995 13:12:21");
 

: EXEC SQL UPDATE alarm_status
: SET GMT = TO_DATE(ds,'DD-MM-YYYY HH24:MI:SS')
: WHERE ALARM_ID = :alarm_id;

Two things I found wrong in your code.

  1. "ds" host variable is not declared.
  2. The set statement lacks a colon (:) in the host variable "ds". SET GMT = TO_DATE( :ds,'DD-MM-YYYY HH24:MI:SS') ^ ^ Correct these errors and give me an email if the error still persists.

Hope this helps!

cheers :)
jeff

--
=============================================================================
Jeff Cerrafon
cerrafon_at_iconz.co.nz      "Hard work makes a good idea possible"
+64 25 955762
=============================================================================
Received on Thu Jan 05 1995 - 08:51:20 CET

Original text of this message