Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Correlated subquery

Author  Topic 

sona
Yak Posting Veteran

68 Posts

Posted - 2002-01-03 : 04:18:19
i have a derived table got from many subqueries like this.


select A.a,A.b,A.c,B.d From table1 innerjoin
( select ... innerjoin
( select..
)
)

What is want to do is with the above query is

select a,b,c,d from (
select A.a,A.b,A.c,B.d From table1 innerjoin
( select ... innerjoin
( select..
)
)
where a=(select max(d) from
(
select A.a,A.b,A.c,B.d From table1 innerjoin
( select ... innerjoin
( select..
)
) on ...


i have to use the big query(actually it is quite big than the above one) inside the subquery.
is there any way that i can use alias name

Nazim
A custom title

1408 Posts

Posted - 2002-01-03 : 05:03:27
Your question is too vague, and i think you are already using Aliases. it is better you post your original query then might be some good suggestions will pour in.



----------------------------
Anything that Doesn't Kills you Makes you Stronger
Go to Top of Page

Rafiq
Starting Member

25 Posts

Posted - 2002-01-03 : 07:15:07
I could not understand your query.Please send a actual query.I will try to give answer for your query.

Rafi
Go to Top of Page
   

- Advertisement -