![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to create the following trigger. CREATE TRIGGER paRelateLinkInsert AFTER INSERT ON paRelate FOR EACH ROW BEGIN INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR) VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId, NEW.FromRR); INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR) VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId, NEW.FromRR); END When I run this in PCC I get the error, "6: '': Syntax error". After some additional experimentation I have discovered that I get the same error if I remove the second INSERT. However, if I then remove the BEGIN and END the trigger is created. So the cause of the error is the way I am using the BEGIN and END. What am I doing wrong? |
#3
| |||
| |||
|
|
I had no problem running this is the PCC with Pervasive.SQL V8.7 (Changing paRelate to Person so it would work on DEMODATA): |
#4
| |||
| |||
|
|
CREATE TRIGGER paRelateLinkInsert AFTER INSERT ON Person FOR EACH ROW BEGIN INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR) VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId, NEW.FromRR); INSERT INTO paRecLink (RR, RecType, AliasId, TableId, TableRR) VALUES (NEW.RR, NEW.RecType, NEW.FromAliasId, NEW.FromTableId, NEW.FromRR); END |

#5
| |||
| |||
|
#6
| |||
| |||
|
|
I just got confirmation that this is a bug in PCC 9.5. |
#7
| |||
| |||
|
|
I just got confirmation that this is a bug in PCC 9.5. -- .Bill. |
![]() |
| Thread Tools | |
| Display Modes | |
| |