If limit is not set at all, we can ignore offset; if limit is set but offset is zero, use normal select with simple SET ROWCOUNT. Thus, only use the temp table if limit is set and offset > 0.
[Validate]