powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / SQL system error.
8 сообщений из 8, страница 1 из 1
SQL system error.
    #34989975
Тимур Б
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Привет Всем! Такой вот случай (непонятный для меня ).Имеется запрос:
select 'ВСЕГО'
,(select count(tk1.cstdate) from yeis.kontracts tk1 where tk1.mfo=tk.mfo ) as dras
,(select sum(case when tagrm.agrmsum=0 or tagrm.agrmsum is null then tk2.kntsum*tk2.currrate_c else tagrm.agrmsum*tagrm.currrate end)
from yeis.kontracts tk2 left outer join (select * from YEIS.Agrmnts TAgrm where TAgrm.AgrmNo=(select max(TAgrm1.AgrmNo)
from YEIS.Agrmnts TAgrm1 where TAgrm1.KntID=TAgrm.KntID)) as TAgrm on TK2.KntID=TAgrm.KntID where tk2.mfo=tk.mfo) as gdsName
,count(TD.DlvDate) as dlvdate
,(select sum(tpf.pmsum*tcr.currrate/tcr.currcount) as SUMTPf from yeis.paymfact tpf inner join yeis.currrate tcr on tcr.kod=tpf.currkod
inner join yeis.kontracts tk4 on tk4.kntid=tpf.kntid where tcr.chdate= (select max(tcr1.chdate) from yeis.currrate tcr1
where tcr1.kod=tcr.kod and sign(tpf.pmdate-tcr1.chdate)>=0) and tcr.currcount<>0 and tk4.mfo=tk.mfo) as receipts
,(select sum(TCSl.PmSum*TCSl.CurrRate/TCSl.CurrCount) as SUMTCSl from YEIS.CurrSale TCSl inner join yeis.kontracts tk5 on tcsl.kntid=tk5.kntid
where TCSl.CurrCount<>0 and tk5.mfo=tk.mfo) as sUMTCSl
,count(TD.BoardDate) as arrivalgoods
,(select sum(TOp.C_Oplat*tk6.currrate_r) from YEIS.Oplata TOp
inner join yeis.kontracts tk6 on tk6.kntid=top.kntid where tk6.mfo=tk.mfo) as dlvTrm
,sum(case when UCASE(TK.KntType)='ИМ' then TD.InvCost*TK.CurrRate_c else 0 end)-(select sum(TOp.C_Oplat*tk6.currrate_r)
from YEIS.Oplata TOp inner join yeis.kontracts tk6 on tk6.kntid=top.kntid
where tk6.mfo=tk.mfo and ucase(tk6.knttype)='ИМ') as debtor
,sum(case when UCASE(TK.KntType)='ЭК' then TD.InvCost*TK.CurrRate_c else 0 end)-(select sum(TOp.C_Oplat*tk6.currrate_r)
from YEIS.Oplata TOp inner join yeis.kontracts tk6 on tk6.kntid=top.kntid
where tk6.mfo=tk.mfo and ucase(tk6.knttype)='ЭК') as kreditor
,(select count(tsr.dzakr) from yeis.srok tsr inner join yeis.kontracts tk7 on tk7.kntid=tsr.kntid
where tk7.mfo=tk.mfo) as contrtakenout
from YEIS.Kontracts TK left outer join YEIS.Deliver TD on TD.KntID=TK.KntID
where TK.MFO=00914 group by tk.mfo

При его компиляции выдает сообщение Error: java.sql.SQLException: [SQL0901] SQL system error., SQL State: 58004, Error Code: -901
...
Рейтинг: 0 / 0
SQL system error.
    #34989984
Тимур Б
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Глюк какойто на сайте прозошел-выдал сообщение что: либо пароль не правилен либо была попытка взлома или еще что там.Поэтому тема опубликовалась 2 раза ...
...
Рейтинг: 0 / 0
SQL system error.
    #34993046
Тимур Б
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Хмм.. неужели не у кого не было такой ситуации, может у кого нибудь есть какие нибудь мысли?
...
Рейтинг: 0 / 0
SQL system error.
    #34993278
Mark Barinstein
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Платформа какая?
iSeries?
...
Рейтинг: 0 / 0
SQL system error.
    #34993305
tapochek
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Mark BarinsteinПлатформа какая?
iSeries?
Да.
...
Рейтинг: 0 / 0
SQL system error.
    #34993331
Mark Barinstein
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
В лог job'а надо смотреть.
Оно часто там пишет подробнее, что ему не нравится.
...
Рейтинг: 0 / 0
SQL system error.
    #34999949
Тимур Б
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Не пойму что за ошибка опять тоже самое , а запрос другой
select tk.kntid as kntid ,sum(td.invcost*tk.currrate_c) as sumTDInvCst
,(select sum(case when top.c_oplat is not null then top.c_oplat*tk1.currrate_r else 0 end)
from yeis.kontracts tk1 left outer join yeis.oplata top on tk1.kntid=top.kntid
where tk1.kntid=tk.kntid ) as sumTOpALL
from yeis.kontracts tk
left outer join yeis.deliver td on tk.kntid=td.kntid
where ucase(tk.knttype)='ИМ' and '2008-01-01'>td.boarddate and TK.Name_ExpStr='860' and TK.MFO='00914'
group by tk.kntid having sum(td.invcost*tk.currrate_c)!=
(select sum(case when top.c_oplat is not null then top.c_oplat*tk1.currrate_r else 0 end)
from yeis.kontracts tk1 left outer join yeis.oplata top on tk1.kntid=top.kntid where tk1.kntid=tk.kntid )
and sum(td.invcost*tk.currrate_c)>(select sum(case when top.c_oplat is not null then top.c_oplat*tk1.currrate_r else 0 end)
from yeis.kontracts tk1 left outer join yeis.oplata top on tk1.kntid=top.kntid where tk1.kntid=tk.kntid )

Error: java.sql.SQLException: [SQL0901] SQL system error., SQL State: 58004, Error Code: -901
...
Рейтинг: 0 / 0
SQL system error.
    #35003848
Тимур Б
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Нашел причину: ошибку давал из-за условия ucase(tk.knttype)='ИМ' но не пойму почему...
если делаю tk.knttype='ИМ' то все ок.Почему ругается на ucase??
...
Рейтинг: 0 / 0
8 сообщений из 8, страница 1 из 1
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / SQL system error.
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]