suppose there are two tables
1_t (a,b,c)
2_t(d,e)
and other_name means to have the alias for the records chose
select a, b
(select d from 2_t where d=1 and e=2) other_name,
from 1_t
where b between 1 and 2
and c = 3
order by a, b;
Printable View
suppose there are two tables
1_t (a,b,c)
2_t(d,e)
and other_name means to have the alias for the records chose
select a, b
(select d from 2_t where d=1 and e=2) other_name,
from 1_t
where b between 1 and 2
and c = 3
order by a, b;
First ...
select a, b, <-- see the comma
It would help us a lot if you provide an ORA error you are getting with your query.
At a first glance, I would say your query is missing a comma between column b and your subselect:
select a, b,
(select d from 2_t where d=1 and e=2) other_name,
from 1_t
where b between 1 and 2
and c = 3
order by a, b;
lose the , after other_name
Yeah, that too. Good catch!Quote:
Originally posted by kmesser
lose the , after other_name