tags:

views:

43

answers:

2

I am inside oracle procedure

I have a complex query with join which gives single value to which i assign alias

now can i pass alias in where clause in another query rather than making above query again as subquery?

A: 

Yes, provided its in scope (ie a subquery you're joining to in the FROM clause that the WHERE exists in).

kekekela
no what i don't want to use subquery
Faisal khan
A: 

Question's not making a lot of sense. Can you provide an example? Why don't you define your query as a cursor that you can call repeatedly, or loop through?