Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

2 total

Reset Error AutoFile

// description of your code here

update orders set statusid = 1,currentqueueid = 1, ntuser = null,checkedout = null where orderid = 19111067

Get Efile Counts

// description of your code here

select
	convert(varchar(6),n.notedate) as [date],count(*) as cnt
into
	#temp
from
	orders o inner join	
	orderdetail od on o.orderid = od.orderid inner join
	ordernotes n on o.orderid = n.orderid
where
	od.jurisdictionid = 3152 and
	od.serviceid in (3,4,12,13,15,18) and
	(n.noteid = 18 and n.notedate between '1/1/2006 12:01 AM' and '12/31/2006 11:59 PM')
	--(n.noteid = 129 and n.notedate between '1/1/2006 12:01 AM' and '12/31/2006 11:59 PM')
group by
	convert(varchar(6),n.notedate)
order by
	convert(varchar(6),n.notedate)

select * from #temp
compute sum(cnt)
drop table #temp
2 total