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.
| Author |
Topic |
|
iamsmahd
Yak Posting Veteran
55 Posts |
Posted - 2005-11-17 : 08:38:31
|
| hi all...why some times we need to write a subquery in order to get the max, min or avg and some times we don't need ?for example I do not know that should I use a subquery to get the max of StartDate of a contract or not ?Select t1.f1 from t1 inner join t2 on t1.f1 = t2.f2 where (t1.StartDate > max (t2.f3)) OR (t1.StartDate > (select max t2.f3 from t2 inner join t1 on ......)sonia |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-17 : 09:01:54
|
| It depends on your requirementPost your exact requirementMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|