Viewing 8 posts - 16 through 23 (of 23 total)
OK, Thanks a lot. It helps me a lot. BTW, I would also like to know the columns of which is indexed.
Thanks.
April 26, 2006 at 11:35 pm
Thanks Anders!!!...that would be a great help
August 12, 2004 at 6:16 pm
Noooo...it still wrong...
Update wtp.MaxDate = (SELECT max(wtf2.create_dt) FROM WT_ESPP_FACT wtf2 JOIN wt_total_purchases wtp1
ON wtf2.optioneekey = wtp1.Optioneekey
AND wtf2.offeringperiodkey = wtp1.OfferingPeriod
WHERE wtf2.eventkey IS NULL) FROM wt_total_purchases wtp
August 12, 2004 at 1:57 am
I think this should be wrote like this:
Update wtp.MaxDate = (SELECT max(wtf2.create_dt) FROM WT_ESPP_FACT wtf2 JOIN from wt_total_purchases wtp
WHERE wtf2.optioneekey = wtp.Optioneekey
AND wtf2.offeringperiodkey = wtp.OfferingPeriod
AND wtf2.eventkey IS NULL)
August 12, 2004 at 1:54 am
What do you mean by this code?:
MaxDate = (SELECT max(wtf2.create_dt) FROM WT_ESPP_FACT wtf2
WHERE wtf2.optioneekey = wtp.Optioneekey
AND wtf2.offeringperiodkey = wtp.OfferingPeriod
AND wtf2.eventkey IS NULL)
from wt_total_purchases wtp
Anyway...
August 12, 2004 at 1:52 am
Actually I coded already the declare cursor and here's the code:
DECLARE cursor TotalCursor FOR SELECT OptioneeKey, OfferingPeriodKey
FROM WT_Total_Purchases
OPEN TotalCursor
FETCH NEXT FROM TotalCursor
INTO @intOptioneekey, @intOfferingPeriod
WHILE @@FETCH_STATUS = 0
BEGIN
SET @dtmMinDate...
August 10, 2004 at 10:38 pm
Viewing 8 posts - 16 through 23 (of 23 total)