【问题标题】:basic oracle question基本的预言问题
【发布时间】:2009-10-16 13:51:10
【问题描述】:

我有这个问题:

select total.lecgrouplecture(l.groupcode)  lecturename,
       total.lecgrouptime(l.groupcode) lecttime 
  from total.lecgroup l  
 where term = (select term 
                from total.CURENTTERM) 
   and rownum < 10 
order by lecturename

我想知道total.lecgrouptime(l.groupcode) 是什么,从哪里获得这些信息?

【问题讨论】:

  • 请使用大写字母开始句子。

标签: sql oracle plsql


【解决方案1】:

total 是包名

lecgrouplecture 是该包中的一个函数

在 user_source 中查找代码或使用 SQL Developer 或 TOAD 等 GUI

【讨论】:

  • 谢谢。我使用这个查询来查看内部用户源:SELECT * FROM User_Source 但我看不到任何关于 lecgrouplecture 的信息。
  • 从 user_source 中选择文本,其中 name = 'TOTAL' order by line;可能你不是包的所有者:select text from all_source where name = 'TOTAL' order by line;
【解决方案2】:

看起来 TOTAL 是模式的名称 (SELECT * FROM all_users WHERE username = 'TOTAL')。如果是这种情况,那么lecgrouplecture 必须是一个 pl/sql 函数。你会发现它对Robert 的查询有什么作用:

SELECT * 
  FROM all_source 
 WHERE owner = 'TOTAL' 
   AND name = 'LECGROUPLECTURE' 
 ORDER BY line;

【讨论】:

  • @Vincent:谢谢=)。我已经习惯了编写包,我什至不认为它可以是一个独立的功能。
猜你喜欢
  • 2019-07-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-07-13
  • 2012-05-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多