declare @pagenum int = 1; select * into #temp from posts ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @pagenum int = 1;
select * into #temp from posts where year(CreationDate)=year(getdate())
alter table #temp drop column LastEditDate
alter table #temp drop column LastEditorUserId
alter table #temp drop column LastEditorDisplayName
alter table #temp drop column CommunityOwnedDate
select ROW_NUMBER()OVER(order by LastActivityDate desc) num,* into #out from #temp

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results