免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1567 | 回复: 3
打印 上一主题 下一主题

如何在存储过程中实现对文件得操作 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-05-21 15:37 |只看该作者 |倒序浏览
请教各位,如何在存储过程中实现对文件得操作,具体函数是什么,比如打开,读取,谢谢

论坛徽章:
0
2 [报告]
发表于 2004-05-21 16:28 |只看该作者

如何在存储过程中实现对文件得操作

你可以查看一下关于utl_file包的相关函数,比如fopen,fclose,new_line,put_line,putf等。

论坛徽章:
0
3 [报告]
发表于 2004-05-21 16:35 |只看该作者

如何在存储过程中实现对文件得操作

是的,但是得设一个读取路径。

论坛徽章:
0
4 [报告]
发表于 2004-05-23 11:41 |只看该作者

如何在存储过程中实现对文件得操作

下面列出了DBMS_LOB包中的过程函数:

APPEND procedure Appends the contents of the source LOB to the destination LOB.

CLOSE procedure Closes a previously opened internal or external LOB.

COMPARE function Compares two entire LOBs or parts of two LOBs.

COPY procedure Copies all, or part, of the source LOB to the destination LOB.

CREATETEMPORARY procedure Creates a temporary BLOB or CLOB and its corresponding index in the user's default temporary tablespace.

ERASE procedure Erases all or part of a LOB.

FILECLOSE procedure Closes the file.

FILECLOSEALL procedure Closes all previously opened files.

FILEEXISTS function Checks if the file exists on the server.

FILEGETNAME procedure Gets the directory alias and file name.

FILEISOPEN function Checks if the file was opened using the input BFILE locators.

FILEOPEN procedure Opens a file.

FREETEMPORARY procedure Frees the temporary BLOB or CLOB in the user's default temporary tablespace.

GETCHUNKSIZE function Returns the amount of space used in the LOB chunk to store the LOB value.

GETLENGTH function Gets the length of the LOB value.

INSTR function Returns the matching position of the nth occurrence of the pattern in the LOB.

ISOPEN function Checks to see if the LOB was already opened using the input locator.

ISTEMPORARY function Checks if the locator is pointing to a temporary LOB.

LOADFROMFILE procedure Loads BFILE data into an internal LOB.

OPEN procedure Opens a LOB (internal, external, or temporary) in the indicated mode.

READ procedure Reads data from the LOB starting at the specified offset.

SUBSTR function Returns part of the LOB value starting at the specified offset.

TRIM procedure Trims the LOB value to the specified shorter length.

WRITE procedure Writes data to the LOB from a specified offset.

WRITEAPPEND procedure Writes a buffer to the end of a LOB.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP