Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Simple TRIGGER... not working !?

$
0
0

Hello,

 

I'm new in SQL so I try to do some basic stuff.

 

I have created a sequence and I want to increment the sequence in a trigger, here is my code :

 

create trigger <my_schema>."myTrigger" before insert 
on <my_schema>."COMMENT" 
referencing new row newrow
for each row begin  select <my_schema>."my_sequence".NEXTVAL into :NEWROW.ID from dummy;
end

Is someone can explain me why it doesn't work ?

 

Here is the error :

 

Could not execute 'create trigger <my_schema>."myTrigger" before insert on ...'

SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near ":NEWROW": line 5 col 85 (at pos 255)

Kind regards,


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>