thanks sathyarams, i just tried what you suggested, however it's suggseting a FROM clause is expected, although why i don't know... but at least it's a different error!
C:\PROGRA~1\SQLLIB\BIN>db2 -td@ -f G:\Documents\SYS\MB21\Re-assessment\trigger.sql
DB21034E The command was processed as an...
Thanks for the tip T.Blom but unfortunately that doesn't work, nice idea though. I tried replacing max with line_count in each case, but i got the same error:
During SQL processing it returned:
SQL0104N An unexpected token "line_count" was found following "MODE DB2SQL...
Hi, the error message i get is:
SQL0104N An unexpected token "max" was found following "MODE DB2SQL DECLARE".
Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
I'll also check out that link you provided,
Thanks,
Jim
Hi,
I'm having a bit of trouble getting the syntax correct for DB2, please can someone help. :-)
Here is the statement i want to add:
CREATE TRIGGER archive
AFTER INSERT ON order
REFERENCING NEW AS new
FOR EACH ROW MODE DB2SQL
DECLARE max INTEGER;
BEGIN
SELECT COUNT(*) INTO max
FROM...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.