Re: User Trigger?????????????

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Wed, 18 Dec 2002 01:36:13 GMT
Message-ID: <hiQL9.407949$NH2.29323_at_sccrnsc01>


use user
try this.
Log into Oracle via sqlplus and run
select user from dual;
notice that you get back the name of the person logged in. So just do :new.user_name:=user;
in your trigger just like you are doing for sysdate. Jim
"Joe Christopher" <jchristopher_at_loopexpert.com> wrote in message news:1c5371b4.0212170920.7fa423f2_at_posting.google.com...
> Hello,
>
> I'm new to the group and have a couple of questions I was hoping
> someone could help me with.
>
> I have datestamp and current_user fields in my table. Every time a
> record has been inserted, or updated, I would like my trigger to
> update the datestamp with the sysdate and the current_user with the
> logged in use who made the change. I have the datestamp trigger
> working fine but am having trouble getting the user correct.
>
> I am not too great with PL/SQL. How can I get the user field to be
> updated with the current user in my trigger?
>
> Thanks!!!!
> Joe
Received on Wed Dec 18 2002 - 02:36:13 CET

Original text of this message