难题,请问在建立视图的时候,能否调用用户自定义的function?

c_g 2003-09-30 05:41:00

CREATE or replace VIEW v_zzsyb_gjj
AS
select
kjqj as ny,
udf_IncIncQuarter('40101',kjqj) as zfgjjcklxsr
from h_qjkzb
;

udf_IncIncQuarter为我定义的函数
...全文
41 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
f3611018 2003-11-20
  • 打赏
  • 举报
回复
友情up
beckhambobo 2003-11-20
  • 打赏
  • 举报
回复
检查函数是否有问题
LGQDUCKY 2003-11-14
  • 打赏
  • 举报
回复
可以:这是我建立的视图:如下
sql>create view aaaa as
2 SELECT "OA_PVT_APPENDIX"."BBH","OA_PVT_APPENDIX"."XH",
3 F_GET_APPENDIX("OA_PVT_APPENDIX"."APPENDIX" ,102,'01002','2003/12/31')
4 FROM "OA_PVT_APPENDIX"
5;

View created
sql>


F_GET_APPENDIX是我自己定义的函数。
蜗牛20008 2003-11-14
  • 打赏
  • 举报
回复
JUST TRY IT,OK
duanhui 2003-11-14
  • 打赏
  • 举报
回复
正确,没有问题:

this is my view
select fun1(tb1.col1),fun2(tb1.col2) from tb1 where fun3(tb1.col1) > 100
beckhambobo 2003-10-01
  • 打赏
  • 举报
回复
Restrictions on the Defining Subquery of a View
The view subquery cannot select the CURRVAL or NEXTVAL pseudocolumns.
If the view subquery selects the ROWID, ROWNUM, or LEVEL pseudocolumns, those columns must have aliases in the view subquery.
If the view subquery uses an asterisk (*) to select all columns of a table, and you later add new columns to the table, the view will not contain those columns until you re-create the view by issuing a CREATE OR REPLACE VIEW statement.
For object views, the number of elements in the view subquery select list must be the same as the number of top-level attributes for the object type. The datatype of each of the selecting elements must be the same as the corresponding top-level attribute.
You cannot specify the SAMPLE clause.
jiezhi 2003-09-30
  • 打赏
  • 举报
回复
just try,I think you can.

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧