Subject Re: [firebird-support] Update record with User-id, is possible ?
Author Martijn Tonies
> Please, I need update my records on the table with User_id, like...
>
> FieldN...
> FieldN...
> Date_of_Registry TimeStamp,
> Date_of_Update TimeStamp,
> User_id varchar(20)
>
> and on trigger...
>
> AS
> BEGIN
> IF (NEW.NUM_NOP = 0) THEN
> NEW.NUM_NOP = GEN_ID(TB_NOP_NUM_NOP_GEN, 1);
> new.Date_of_Registry = 'now';
> new.Date_of_Update = 'now';
> new.User_id = '??????????????????????????' <<<< Here, what I need to
> do ?
> END

If you want the currently logged in user, use CURRENT_USER

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com