Home » SQL & PL/SQL » SQL & PL/SQL » Select within select
Select within select [message #3532] Wed, 02 October 2002 07:08 Go to next message
Ian Beaumont
Messages: 3
Registered: October 2002
Junior Member
I've got some scripts which run against 8.1.7, but fail against 8.0.3. I need to get them working against 8.0.3. Basically the following query summarises my problem (I know it's a silly example):

select (select 'XXXX' from dual) AS YYYY from dual;

Anyone got any idea how/what I can change the statement to get it to run against 8.0.3, bearing in mind I need to dynamically create my select statements like this and I won't be using dual at all. e.g.
select (select DynamicColumn from ColumnNames WHERE ID = 3) AS ColumnName from MyData;
Re: Select within select [message #3537 is a reply to message #3532] Wed, 02 October 2002 11:18 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
8.03 simply does not support that syntax. You will need to either move those down into the WHERE clause or write functions for each of the lookups.
Previous Topic: Index creation
Next Topic: ORACLE SQL- Table definition
Goto Forum:
  


Current Time: Mon May 06 10:08:24 CDT 2024