Oracle Forms 2.3 question on possible bug in using to_char

From: Michael Winters <winters_at_access3.digex.net>
Date: 4 Jan 1994 23:40:48 -0500
Message-ID: <2gdgcg$3n4_at_access3.digex.net>


I am getting a truncation problem with doing the following trigger in Oracle Forms 2.3:

select to_char(donor_seq,'09999')
into :donor.donor_code
from ops$irm015.last_donor

last_donor has one column, donor_seq, defined as integer(5)
:donor.donor_code is a char(5) variable.

After performing the above select statement in a pre-insert trigger,
:donor.donor_code = '0000'.

If I perform the SQL statement in SQL*PLUS, it works fine. For example, if donor_seq = 8, the result of the query (and what should be in :donor.donor_code) = '00008'

I am going to go ahead and write a trigger to convert numeric to character (just concatenate the proper no. of "0s" to the seq. no.), but I am curious why things work fine in SQL*PLus and not in SQL*Forms? Any help on this will be appreciated, since I will be using Oracle Forms 3.0 within 4 months or so, as soon as ESA is up on our monster IBM, so this is my last 2.3 weirdness to learn about! :-)

  • Mike Winters Peace Corps (202)606-3330
Received on Wed Jan 05 1994 - 05:40:48 CET

Original text of this message