Salut Jean et tout-le-monde *monde*....
 
I am coming close but having quite got this syntax down pat... I found a SAPDB archive 
which was a little more helpful at researching examples but it is still taking too 
long and I have so much code to write....
 
I finally got something to compile and work as a trigger... I just need a couple of 
missing pieces.  What I want is a trigger that before an INSERT or UPDATE will set a 
DATEfield to the current-date and a TIME field to the current time.  What I have so 
far is below:
 
CREATE  TRIGGER UpdateDateTime for cm.todo
    after  INSERT 
    execute 
    (
    update cm.todo set complete = 'R' where id = :new.id ;
    )
 
I know about the dual table but I don't know how to get singleton selects into a host 
variable.  
 
Any help or clues appreciated... Surely there is an archive somewhere of decent 
examples... if someone could point me to that it would help.
 
 
 
 
 
 
 
 


Jean-Michel OLTRA <[EMAIL PROTECTED]> wrote:

bonjour,


Le jeudi 13 mai 2004, H a �crit...



> Trigger on Table Customer
> Before Insert or Update
> Set DateField = Today() 
> Set TimeField = Now()

SELECT DATE FROM SYSDBA.DUAL
SELECT TIMESTAMP FROM SYSDBA.DUAL

then have a glance to DATE functions, and trigger documentation

-- 
jm


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



---------------------------------
Post your free ad now! Yahoo! Canada Personals

Reply via email to