Subject Re: (unknown)
Author hughman72212
Set,
I had made the trigger for the PTDEMOG table. Perhaps I am going
about this all wrong. This database is for medical pathology cases. I
am trying to store PDF report images for archival purposes. I strip
all the text out of the PDF and parse it into PTDEMOG table. I
assumed everything would link to the specimen number,ie. AP2002-1234,
so I set up a table SPECNO and when an entry is made to PTDEMOG, the
SPECNO table is checked for the existance of the specimen number
PTDEMOG.PATHNO. If not, a record is added to table SPECNO. I then
wanted to link PTDEMOG to SPECNO through PTDEMOG.SPECIMENID -
SPECNO.SPECIMEN_NO. I thought after the entry into SPECNO and the
Post of the PTDEMOG, the SPECIMENID could be set to
SPECNO.SPECIMEN_NO based on the common PATHNO field.

Hugh

> committed his/her changes. Assuming your trigger is for the SpecNo
table,
> what you probably want is as simple as
>
> ALTER TRIGGER SPECIMENNO_INSERT
> AFTER INSERT
> POSITION 0
> AS
>
> BEGIN
>
> UPDATE PTDEMOG
> SET SPECIMENID = NEW.specimen_no
> WHERE PATHNO = NEW.PATHNO;
>
> END
>
> HTH,
> Set