Query Issues
Can anyone explain to me why the first query below does not work but the second one does? The first one works if I remove the literal (1 as lookup). Just looking for a little background on why it's failing with a Ora-000936 expression behind the scenes.
Query 1 - Fails
select
1 as Lookup,
*
from Table1
where ID in (Select subid from Table2)
Query 2 - Works
select
1 as Lookup,
t1.*
from Table1 t1
where t1.ID in (Select subid from Table2)
Note that they both work correctly with Microsoft SQL Server.
Query 1 - Fails
select
1 as Lookup,
*
from Table1
where ID in (Select subid from Table2)
Query 2 - Works
select
1 as Lookup,
t1.*
from Table1 t1
where t1.ID in (Select subid from Table2)
Note that they both work correctly with Microsoft SQL Server.
0