Viewing 5 posts - 16 through 20 (of 20 total)
select a.RecID , a.PC ,
case when 100-sum(case when b.PC >a.PC then b.PC end) <20.0 then 0 else 1 end
from sums a, sums b
group by a.RecID, a.PC
rec16...
February 14, 2008 at 9:28 am
oops, sorry . upside down
February 14, 2008 at 8:30 am
To get the hits, try
select a.RecID
from sums a, sums b
where b.PC >=a.PC
group by a.RecID
having sum(b.PC) >= 80.0
February 14, 2008 at 8:10 am
If the table contains unique keys, you can keep the integrity of your extract without having to hold up other users:
- select keys to a temporary table;
- select...
August 24, 2007 at 8:44 am
Two ways suggest themselves
1. Keeping the current format
At the start of the sproc
select distinct substring (fdis_claim.claimset_id, 1,8) date into #temp1
FROM FDIS_CLAIM, FDIS_CLAIMSET
WHERE
FDIS_CLAIM.CLAIMSET_ID = FDIS_CLAIMSET.CLAIMSET_ID
AND...
July 6, 2007 at 3:39 am
Viewing 5 posts - 16 through 20 (of 20 total)