由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - help: question on oracle sys_context()
相关主题
Questions on SQLA question about recursive query
SQL question HELPDecrypting Datasources in SSRS
help! A bug about date type !这题目啥意思啊?
Re: help: question on oracle sys_context(). more confused :(请教oracle8如何用
a simple question about insertCodes Re: 求教: Join 两个query (data)
跪求高人指点:一道SQL题3/5个包子可以么?先谢了!请教一个术语:server administration
PB SQL语句的简单问题create linked server problem, please help
Question on relational calculusRe: Job with Oracle PL? (转载)
相关话题的讨论汇总
话题: sys话题: context话题: fname话题: oracle话题: sql
进入Database版参与讨论
1 (共1页)
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.

1 (共1页)
进入Database版参与讨论
相关主题
Re: Job with Oracle PL? (转载)a simple question about insert
求教:跪求高人指点:一道SQL题3/5个包子可以么?先谢了!
告诉病人FEDEX账号会有麻烦么?(这个病人是EVIL么)PB SQL语句的简单问题
这个网站挺有意思Question on relational calculus
Questions on SQLA question about recursive query
SQL question HELPDecrypting Datasources in SSRS
help! A bug about date type !这题目啥意思啊?
Re: help: question on oracle sys_context(). more confused :(请教oracle8如何用
相关话题的讨论汇总
话题: sys话题: context话题: fname话题: oracle话题: sql