Hello my friends,
Does anyone know why this does not work?
select col1, col2,
when (select 'test' as colx) = 'test' then 'match'
else 'do not match'
(select 'x' as col1, 'y' as col2) as internal_table
The error says:
Could not execute statement.
The column 'col1' in the outer query is not present in the derived table
Sybase error code=11751
Severity Level=15, State=1, Transaction State=1
1:select col1, col2,
2: "col3" =
4: when (select 'test' as colx) = 'test' then 'match'
5: else 'do not match'
9: (select 'x' as col1, 'y' as col2) as internal_table