all groups > sql server (alternate) > january 2007 >
You're in the

sql server (alternate)

group:

Things I didn't know until today


Things I didn't know until today amaxen
1/24/2007 12:13:34 PM
sql server (alternate): You can use a Select top @variable in sql server 2005:

Thus:


--'Throttle' the result set:
Select Top (@MaxBatchSize)
KeyID
, LId
, ArrivalDt
, CaptureDt
, Lat
, Long
From GPSData
Order By CaptureDt Desc

Makes messing with Set Rowcount *so* redundant :-)
Re: Things I didn't know until today MC
1/24/2007 9:17:43 PM
YOu can also use UPDATE TOP :)

MC

[quoted text, click to view]

AddThis Social Bookmark Button