Help needed with writing a Trigger

From: Steve Dirschel <steve_dirschel_at_cargill.com>
Date: 1996/10/29
Message-ID: <32763D65.8F4_at_cargill.com>#1/1


I need a trigger for the following situation:

Data will be sent to a table with a date field on it. But the field being sent to the table that cooresponds with the date field is not in a date format (it is a regular number field). I have writted a function called VALDATE to accept this numeric field and convert to a date (we needed to use a special function because we needed special error checking).

We currently convert the numeric date to the "date" date by calling the VALDATE function within our insert startment. We want to have a trigger fire upon insert that will call the VALDATE function for that one row which will then convert that field into a date format.

Can you change the format of a field with a trigger? If so, could someone please send me a sample of the code that would be used? I haven't written triggers in the past so this is why I need assistance on this issue.

Thanks in advance
Steve Dirschel

e-mail steve_dirschel_at_cargill.com Received on Tue Oct 29 1996 - 00:00:00 CET

Original text of this message