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
select * from (select cast(.... returns null [CORE2317] #2741
Comments
Commented by: @asfernandes Cannot reproduce in HEAD: SQL> create or alter procedure PROC1 returns (proc char(50), acto char(50)) D_COL11R1oK3qxdM Please create a reproducible test case. |
Commented by: Daniel (danyschaer) Hi Adriano; I found the problem is when working with a view, but not if I work with tables: CREATE TABLE PROC( CREATE TABLE TPRO( CREATE VIEW PROC1 (PROC, ACTO, DEMA, OBSE, D_TPRO) If I do: select * from (select cast("ACTO" as character(100)) as "D_COL1" from "PROC1" where "PROC"='1R1oK3qxdM') AA returns NULL, but if I do: select * from (select cast("ACTO" as character(100)) as "D_COL1" from "PROC" where "PROC"='1R1oK3qxdM') AA returns the correct value. It also returns fine if I do: select * from (select "ACTO" as "D_COL1" from "PROC1" where "PROC"='1R1oK3qxdM') AA ... so I think the view is working fine; it seams the problem becomes when casting the fields from the view. Dany |
Commented by: @asfernandes Ok. Simple reproducable metadata and data for the test: CREATE TABLE TPRO( CREATE VIEW PROC1 (PROC, ACTO) insert into proc values ('1R1oK3qxdM', '1', '2'); |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: Daniel (danyschaer) Thank you. Did you see the problem now?. |
Commented by: @asfernandes Yes, will look at it soon. |
Commented by: @asfernandes Please test the fix on a new build. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Beta 1 [ 10251 ] |
Commented by: @pcisar QA test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovQA Status: No test => Done successfully |
Submitted by: Daniel (danyschaer)
Is related to QA388
Hi;
This is my first report here so very sorry if I made mistakes. I just try to help testing new 2.5.
select * from (select cast("ACTO" as character(100)) as "D_COL1" from "PROC1" where "PROC"='1R1oK3qxdM') AA
Using the FB 2.5.0.27748-0 this expression returns D_COL1 = null.
It worked fine at least up to FB 2.5.0.20343-0
I don't know if it helps, but It works fine if I do (with old and new FB):
select * from (select "ACTO" as "D_COL1" from "PROC1" where "PROC"='1R1oK3qxdM') AA
Dany
Commits: afed84f
The text was updated successfully, but these errors were encountered: