dynamobi/dynamobi — Issue #621: [FRG-251] UDX column list lookup doesn't see aliases in cursor
Author: dynamobi-build
Created: 2011-12-30 03:39:08+00:00
State: closed
Labels: FRG, SQL Validator

[reporter="jvs", created="Sat, 20 Jan 2007 16:02:12 -0500 (GMT-05:00)"]
select sname, creator, crc_value from table(

applib.generate_crc(

cursor(select schema_name as sname, creator from sys_root.dba_schemas),

row(sname),

true

)

);

gives

Error: From line 4, column 13 to line 4, column 17: Column 'SNAME' not found in any table (state=,code=0)

This works fine:

select sname, creator, crc_value from table(

applib.generate_crc(

cursor(select schema_name as sname, creator from sys_root.dba_schemas)

)

);

Whereas this one incorrectly passes validation, but then fails at execution:

select sname, creator, crc_value from table(

applib.generate_crc(

cursor(select schema_name as sname, creator from sys_root.dba_schemas),

row(schema_name),

true

)

);

with

Error: column 'SCHEMA_NAME' not found (state=,code=0)