Viewing 11 posts - 16 through 26 (of 26 total)
Thank You! You saved me a ton of time.
December 8, 2010 at 2:29 pm
Thanks. I am learning CTE and so it was helpful when you broke it down, but how do you put all this in one query?:-)
December 8, 2010 at 1:01 pm
:-)Thanks. Here it is:
if (object_id('tempdb..#Astime') is not null) drop table #Astime
create table #Astime (ResourceId smallint, Site smallint,
DateKey int, TimeKey int, EventType smallint)
insert into #Astime
select 1, 1, 20100901, 80010,2
union
select...
December 8, 2010 at 11:40 am
Hi,
Now with a twist , I want to do same as before but update the TeamAverageHold time as a sum of Teams 1 and 2 :
...
May 23, 2008 at 3:42 pm
This does it without using a view:
SELECT ITS.ItemNumber, ITS.ItemName,ITS.StatusDetail,ITS.StatusDate
FROM MAIR_tblItemStatus ITS INNER JOIN
(SELECT MAX(ITS.StatusDate) AS MaxDate, ITS.ItemID
FROM MAIR_tblItemStatus ITS
GROUP BY ITS.ItemID) Sub
ON ITS.ItemID =...
April 8, 2008 at 12:21 pm
Viewing 11 posts - 16 through 26 (of 26 total)