dm7 xml功能测试

[复制链接]
查看11 | 回复9 | 2012-5-21 10:19:41 | 显示全部楼层 |阅读模式
将七公提供的.so保存到bin目录
[root@redflag11012501 bin]# pwd
/opt/dmdbms/bin
[root@redflag11012501 bin]# mv /home/oracle/*so .
重新启动服务
[root@redflag11012501 bin]# ./DmServiceDMSERVER stop
Stopping DmServiceDMSERVER: [OK]
[root@redflag11012501 bin]# ./DmServiceDMSERVER start
Starting DmServiceDMSERVER: [OK]
用客户端登录
[root@redflag11012501 bin]# ./disql
isql V7.0.1.133-Build(2012.04.27-18008)
SQL>login
server:localhost
user name:sysdba
password:
port:
ssl path:
ssl password:
Server[localhost:5236]:mode is normal state is open
login time used:2.757(ms)
执行存储过程
SQL>SP_DTYPE_INIT();
SP_DTYPE_INIT();
1 rows affected
time used: 22.930(ms).Execute id is 1.
SQL>SP_DTYPE_CREATE('XMLTYPE','CLOB', NULL, NULL);
SP_DTYPE_CREATE('XMLTYPE','CLOB', NULL, NULL);
1 rows affected
time used: 12.751(ms).Execute id is 2.

回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
创建表
SQL>CREATE TABLE TEST(C1 XMLTYPE);
CREATE TABLE TEST(C1 XMLTYPE);
time used: 11.186(ms).Execute id is 3.
插入,与插入字符串一样
SQL>INSERT INTO TEST VALUES('223.254.100.54');
INSERT INTO TEST VALUES('223.254.100.54');
1 rows affected
time used: 2.060(ms).Execute id is 4.
保存的内容
SQL>select * from test;
select * from test;
C1
1 223.254.100.54
1 rows got
time used: 1.751(ms).Execute id is 5.
xml查询
SQL>select sf_xmlquery(c1,'for $b in /测试/测试项 return $b/ip/text()') from test;
select sf_xmlquery(c1,'for $b in /测试/测试项 return $b/ip/text()') from test;
sf_xmlquery(c1,'for$bin/测试/测试项return$b/ip/text()')
1 223.254.100.54
1 rows got
time used: 6.498(ms).Execute id is 6.
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
但test表不能desc
SQL>desc test;
描述对象TEST出现错误。错误代码:-70027。错误信息:Invalid cursor status
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
插入另外2行
INSERT INTO TEST VALUES('
557
Fleece Pullover
navy black

563
Floopy Sun Hat

443
Deluxe Travel Bag

784
Cotton Dress Shirt
white gray
Our favorite shirt!
');
1 rows affected
time used: 0.889(ms).Execute id is 7.
INSERT INTO test VALUES(
'
ADAMS-20011127121040988PST

[U]SCOTT[/U]
2006-05-31
Julie P. Adams
[U]ADAMS[/U]
R20
Julie P. Adams
Redwood Shores, CA 94065
650 506 7300
Ground

The Ruling Class

8 1/2

');
1 rows affected
time used: 1.226(ms).Execute id is 9.
SQL>commit;
commit;
time used: 1.082(ms).Execute id is 10.
没有匹配的行返回空?
SELECT SF_XMLQUERY (c1,' for $p in /catalog/product
return if ($p/@dept ="ACC")
then {data ($p/number)}
else {data ($p/number)} ') FROM TEST;
SF_XMLQUERY(c1,'/catalog/product/number[.557
563
443
784

3
3 rows got
time used: 139.273(ms).Execute id is 12.
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
oo兄的动作可真快啊
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
DESC的问题我用昨天的版本测了下,是可以的
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
没有匹配的记录显示空,是不是因为这个查询是全表查询没有where条件?
这个我研究一下别的数据库吧
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
myth8860 发表于 2012-6-5 17:33
DESC的问题我用昨天的版本测了下,是可以的

你们像mysql一样弄一个每日build下载吧
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
呵呵,这个可以考虑一下
回复

使用道具 举报

千问 | 2012-5-21 10:19:41 | 显示全部楼层
myth8860 发表于 2012-6-6 17:56
呵呵,这个可以考虑一下

也提交上去?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行