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
Parsing error in EXECUTE STATEMENT with named parameters [CORE2420] #2836
Comments
Commented by: chedek (chedek2) The strangiest thing is that the query: for execute statement (' select s.cod,s.num, http://s.name,sum(g.summa) from sch s doesn't work too with same preprocess error. |
Modified by: @dyemanovassignee: Vlad Khorsun [ hvlad ] |
Commented by: @hvlad chedek, next time, *please*, post complete script, such as recreate table sch (cod int, num int, name int, prevcod int, udl char(1), root int); create or alter procedure getschdet(cod int, datedoc date, datedoc2 date, execute block as |
Commented by: @hvlad Changed description by more exact one |
Modified by: @hvladsummary: incorrect preparing execute statement with dynamic parameters with duplicated names => Parsing error in EXECUTE STATEMENT with named parameters |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 RC1 [ 10300 ] |
Commented by: @pcisar QA test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: No test => Done successfully |
Submitted by: chedek (chedek2)
Is related to QA397
such query work incorrectly
....
for execute statement (' select s.cod,s.num, http://s.name,sum(g.summa) from sch s
left join getschdet(s.cod,:datedoc ,:datedoc,0,0,0,0,0,0,0,0,0,0,0,1,3) g on 1=1
where s.num in (''50'',''51'') and s.udl<>''У'' and s.root=1
and not exists (select s2.cod from sch s2 where s2.prevcod=s.cod)
group by 1,2,3') (datedoc := :datedoc)
where "datedoc" is TIMESTAMP
it throws error : "....Execute statement preprocess SQL error."
But if I change this query slighlty:
for execute statement (' select s.cod,s.num, http://s.name,sum(g.summa) from sch s
left join getschdet(s.cod,?, ?,0,0,0,0,0,0,0,0,0,0,0,1,3) g on 1=1
where s.num in (''50'',''51'') and s.udl<>''У'' and s.root=1
and not exists (select s2.cod from sch s2 where s2.prevcod=s.cod)
group by 1,2,3') (:datedoc, :datedoc)
It runs wthout any errors !
Commits: 2821d80 3d79776
The text was updated successfully, but these errors were encountered: