New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no current record for fetch operation [CORE6106] #6355
Comments
Modified by: @livius2Attachment: COREXXX.FDB [ 13362 ] |
Modified by: @livius2description: WITH KWARTALY AS FROM
/* robimy liste kwartalow w ktorych obowiazuje status dzialalnosci kontrahenta i szukamy brakow deklaracji */ SQL Message : -508 Engine Code : 335544348 if you change last it run without an error => WITH KWARTALY AS FROM
/* robimy liste kwartalow w ktorych obowiazuje status dzialalnosci kontrahenta i szukamy brakow deklaracji */ ---------------------------------------- SQL Message : -508 Engine Code : 335544348 ---------------------------------------- if you change last it run without an error |
Commented by: Sean Leyne (seanleyne) Reformatted SQL for readibility |
Modified by: Sean Leyne (seanleyne)description: WITH KWARTALY AS FROM
/* robimy liste kwartalow w ktorych obowiazuje status dzialalnosci kontrahenta i szukamy brakow deklaracji */ ---------------------------------------- SQL Message : -508 Engine Code : 335544348 ---------------------------------------- if you change last it run without an error => WITH ---------------------------------------- SQL Message : -508 Engine Code : 335544348 ---------------------------------------- if you change last it run without an error |
Commented by: Sean Leyne (seanleyne) Karol, There are some aspects of the SQL which I find "unexpected": 1- The use of UNION when AND EXISTS could be used 2- The use of an EXISTS as a JOIN criteria, again this could be better expressed as a EXISTS within the WHERE clause 3- You use the alias "KW" 4 separate times. IMO, a very bad practice |
Commented by: @livius2 This is good catch, but as you probably can guess, this is not hand written query. I can change query (some generation paths) to hide the problem. But the issue somewhere exist, when the plan ues one additional index. |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Submitted by: @livius2
Attachments:
COREXXX.FDB
----------------------------------------
----------------------------------------
if you change last
AND K.KONT_NR > 0)
to
AND K.KONT_NR+0 > 0)
it run without an error
The text was updated successfully, but these errors were encountered: