免费注册 查看新帖 |

Chinaunix

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

升级到V6R1 后一些 SQL 无法运行,Error: SQL0338 。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-25 11:52 |只看该作者 |倒序浏览
在原来的系统上可以执行的(V5R1) ,现在升级到 V6R1 导致一些SQL 无法运行。

Error: SQL0338 - JOIN predicate not valid. (State:S1000, Native Code: FFFFFEAE)

sql :

select  distinct
        pscono company,
        psfaci facility,
        psprno garment,
        mmitds item_name,
        psmtno component_number,
        psitty item_type,
        pscnqt quantity

from    mpdsum ,
        mitmas

left outer join
        mitmah
on      pscono = hmcono
and     psmtno = hmitno

inner join MITWHL
on PSCONO=MWCONO  and PSFACI=MWFACI
inner join MITBAL
on PSCONO=MBCONO and MWWHLO=MBWHLO and psmtno=MBITNO


where   pscono = 100
and     psfaci = 'PAP'
and     psstrt = '001'
and     mmcono = pscono
and     mmitno = psmtno

如果全部改为 join 方式就可以了。like  this :

select  distinct
        pscono company,
        psfaci facility,
        psprno garment,
        mmitds item_name,
        psmtno component_number,
        psitty item_type,
        pscnqt quantity

from    mpdsum
inner join  mitmas
on     mmcono = pscono
and     mmitno = psmtno
left outer join
        mitmah
on      pscono = hmcono
and     psmtno = hmitno

inner join MITWHL
on PSCONO=MWCONO  and PSFACI=MWFACI
inner join MITBAL
on PSCONO=MBCONO and MWWHLO=MBWHLO and psmtno=MBITNO


where   pscono = 100
and     psfaci = 'PAP'
and     psstrt = '001'


这算不算as400 的bug  ? ,  ibm  有关于这个问题的补丁吗 ?

论坛徽章:
0
2 [报告]
发表于 2009-08-25 12:17 |只看该作者
做过obj版本到v6r1的步骤吗?

论坛徽章:
0
3 [报告]
发表于 2009-08-25 12:19 |只看该作者
ibm 文档:

Resolving a SQL0338 failure
In V6R1, a query might fail with SQL0338 for queries with a JOIN. In earlier releases, this usage was
allowed. The error needs to be issued because of the implied order of the join condition. To resolve the
SQL0338 failure, add parentheses to the query to remove the ambiguity.
Select a.c1
From BASE1 a LEFT OUTER JOIN BASE3 c
LEFT OUTER JOIN BASE2 b on a.c1 = b.c1
on b.c1n = c.c1n
is equivalent to
Select a.c1
From BASE1 a LEFT OUTER JOIN (BASE3 c
LEFT OUTER JOIN BASE2 b on a.c1 = b.c1) on b.c1n = c.c1n
SQL0338 can also be issued when a table is specified followed by a comma and a joined table.
Select a.c1
From BASE1 a, BASE2 b INNER JOIN BASE3 c on a.c1 = c.c1
is equivalent to
Select a.c1
From BASE1 a, (BASE2 b INNER JOIN BASE3 c on a.c1 = c.c1)
To specify a.c1 in the ON clause for the joined table, include the first table within the joined table.
Select a.c1
From BASE1 a CROSS JOIN BASE2 b INNER JOIN BASE3 c on a.c1 = c.c1


所有的程序和报表都要检查...................

论坛徽章:
0
4 [报告]
发表于 2009-08-25 12:21 |只看该作者
附上ibm 的文档

rzaq9.pdf

491.04 KB, 下载次数: 296

论坛徽章:
0
5 [报告]
发表于 2009-08-25 13:17 |只看该作者
sorry !不是升级的, 新买的机器:

Model: i570 Power6, 35000CPW

CPU: 8 nos. (activated 7 way / 8 way installed)

Memory: 112G (activated 100G / 112G installed)

Storage: 12TB (96x141.12GB 15krpm HDD)

TS3100 Tape Library (LTO4)

有人知道大概要多少rmb 吗?

论坛徽章:
0
6 [报告]
发表于 2009-08-25 19:19 |只看该作者

回复 #5 wguxin 的帖子

Model: i570 Power6, 35000CPW

CPU: 8 nos. (activated 7 way / 8 way installed)

Memory: 112G (activated 100G / 112G installed)

Storage: 12TB (96x141.12GB 15krpm HDD)

TS3100 Tape Library (LTO4)   

total: 大概900万左右

论坛徽章:
0
7 [报告]
发表于 2009-08-25 22:05 |只看该作者
不错 570 595 今后还可以升到power 7

[ 本帖最后由 dave_10 于 2009-8-25 22:13 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2009-08-26 16:48 |只看该作者

回复 #1 wguxin 的帖子

哈哈,楼主使用的是MOVEX。
做了7,8年MOVEX,看着亲切啊,不过现在不做MOVEX了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP