Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

User()

2 posts in Trigger Last posting was on 2004-04-08 09:42:27.0Z
fiaola Posted on 2004-04-07 19:35:07.0Z
From: "fiaola" <nospambigdee72@hotmail.com>
Newsgroups: Advantage.Trigger
Subject: User()
Date: Wed, 7 Apr 2004 08:35:07 -1100
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 64.75.162.50
Message-ID: <40745a28@solutions.advantagedatabase.com>
X-Trace: 7 Apr 2004 13:44:40 -0700, 64.75.162.50
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!64.75.162.50
Xref: solutions.advantagedatabase.com Advantage.Trigger:42
Article PK: 1136109

On your example on your website re "Using Triggers to Maintain an Audit
Table", the USER() function is the USERNAME in the DD, right?

If so, how can I use my own user name that is in a TABLE on my database in
the above trigger example?

Table would USER and Field is USERNAME.


Joachim Duerr (ADS Support) Posted on 2004-04-08 09:42:27.0Z
From: "Joachim Duerr (ADS Support)" <jojo.duerr@gmx.de>
Subject: Re: User()
Newsgroups: Advantage.Trigger
References: <40745a28@solutions.advantagedatabase.com>
Organization: Extended Systems GmbH
User-Agent: XanaNews/1.16.1.9
X-Face: ,QMv7[luB)BpWAQ~:"kw6n%0ieY63.:g2K3n~8ky0;||5Xle*Xq+=~<Fy:0CVC2nx@8~vZ
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 195.2.185.25
Message-ID: <40751073@solutions.advantagedatabase.com>
Date: 8 Apr 2004 02:42:27 -0700
X-Trace: 8 Apr 2004 02:42:27 -0700, 195.2.185.25
Lines: 26
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!195.2.185.25
Xref: solutions.advantagedatabase.com Advantage.Trigger:45
Article PK: 1136113


fiaola wrote in <40745a28@solutions.advantagedatabase.com> :

> On your example on your website re "Using Triggers to Maintain an
> Audit Table", the USER() function is the USERNAME in the DD, right?
>
> If so, how can I use my own user name that is in a TABLE on my
> database in the above trigger example?
>
> Table would USER and Field is USERNAME.

If it's one by one (DD user <-> your user table):

Table user:
dduser username
test this is the test user
Joe Joe Doo

UPDATE __new SET [user]=(SELECT [username] FROM [user] WHERE dduser
LIKE user());

--
Joachim Duerr
EMEA Lead ADS Support, Extended Systems GmbH, Germany
advantage[AT]extendsys.de
European Advantage Conference 2004:
http://www.extendsys.de/go/eac2004