d**a 发帖数: 75 | 1 I had a table and I want to retrieve those rows whose fname
is the same as the user name of the login user. the
following is what i ran in sql+
SQL> select * from e1;
UNAME FNAME LNAME ADDR |
a*****i 发帖数: 4391 | 2 try
select * from e1 where fname like '%'+sys_context('userenv', 'session_user')
+'%';
I suspect the string SYS_CONTEXT returns is not only 'SYSTEM' but with some other
empty spaces.
【在 d**a 的大作中提到】 : I had a table and I want to retrieve those rows whose fname : is the same as the user name of the login user. the : following is what i ran in sql+ : SQL> select * from e1; : UNAME FNAME LNAME ADDR
|
d**a 发帖数: 75 | 3 thanks for your advice. i think i found the problem. it's
not what sys_context returns contains empty spaces but the
fname in e1 contains empty spaces. i will try more. thanks
again.
【在 a*****i 的大作中提到】 : try : select * from e1 where fname like '%'+sys_context('userenv', 'session_user') : +'%'; : I suspect the string SYS_CONTEXT returns is not only 'SYSTEM' but with some other : empty spaces.
|