| 
	
 | 
 Posted by Wes Groleau on 02/03/07 13:41 
Erland Sommarskog wrote: 
> But you could try: 
>  
>       UPDATE Output 
>       SET    xyz = R.maxseg 
>       FROM   Output o 
>       JOIN   (SELECT Raw_segs, maxseg = Max(Seg_Nbr) 
>               FROM   Raw_Segs 
>               WHERE  Seg_Nbr BETWEEN abc AND pqr) R 
>         ON   Output.FID = R.Raw_Segs 
>  
> While this syntax is proprietary and not portable, it often yields better 
> results than a correlated subquery. 
 
I think I also tried that, but maybe not.  I'm going in to work today,  
so I'll make sure.  And I'll make another try at extracting a script 
from that thing. 
 
--  
Wes Groleau 
 
Expert, n.: 
         Someone who comes from out of town and shows slides.
 
  
Navigation:
[Reply to this message] 
 |