Re: Username for this session
Posted in 1997
Vinitha wrote:
> I am involved in a LiveWirePro application with OWS 7.12TC5.
You really should be more discriminating about who you get involved
with! ;-)
> In a
> particular Insert statement, one of the fields is the name of the user
> who is currently performing the Insert operation. Is there a variable
> in Informix like Oracle has "userid" which holds this value and can be
> used directly in the Insert ? If yes, what is the variable ? If no,
> how else could I insert the name of the current session userid into my
> table ?
The USER built-in SQL function.
insert into mytable (col1, col2, col3)
values ("data", "more-data", user)
--
-- Jake (In pursuit of undomesticated aquatic avians)
+----------------------------------------------------------+
|Aside from that, how did you enjoy the play, Mrs. Lincoln?|
+----------------------------------------------------------+