Guest_imported
New member
- Jan 1, 1970
- 0
Hello everyone,
I have the following SQL-statement:
select
t1.name, t1.identifier, t2.nummer, t2.identifier, t2.id
from
table1 t1, table2 t2, table3 t3
where
t1.t2 = t2.id;
This returns values like:
name identifier nummer identifier id
bla1 bla2 4711 bla3 1
bla4 bla5 0815 bla6 5
... ... ... ... ...
Now I want to perform an other SQL-statement inside this SQL-statement but with a returned value from upper statement e.g. in this case with the name-value 'bla1'...
I tried something like this:
select
t1.name, t1.identifier, t2.nummer, t2.identifier, t2.id
from
table1 t1, table2 t2, table3 t3,
( select *
from table4
where table4.name = t1.name -- for each returned name value a
-- new SQL-statement using this
-- value
) bla
where
t1.t2 = t2.id;
But when I run the statement I get the error ORA-00904 (I use Oracle 8.1.7)
Can anyone help me?
I have the following SQL-statement:
select
t1.name, t1.identifier, t2.nummer, t2.identifier, t2.id
from
table1 t1, table2 t2, table3 t3
where
t1.t2 = t2.id;
This returns values like:
name identifier nummer identifier id
bla1 bla2 4711 bla3 1
bla4 bla5 0815 bla6 5
... ... ... ... ...
Now I want to perform an other SQL-statement inside this SQL-statement but with a returned value from upper statement e.g. in this case with the name-value 'bla1'...
I tried something like this:
select
t1.name, t1.identifier, t2.nummer, t2.identifier, t2.id
from
table1 t1, table2 t2, table3 t3,
( select *
from table4
where table4.name = t1.name -- for each returned name value a
-- new SQL-statement using this
-- value
) bla
where
t1.t2 = t2.id;
But when I run the statement I get the error ORA-00904 (I use Oracle 8.1.7)
Can anyone help me?