Forum Replies Created

Viewing 8 posts - 16 through 23 (of 23 total)

  • RE: Complex Computed Columns

    It was great!. Thanks a lot.

  • RE: How to get the unique indexes in a certain Db

    OK, Thanks a lot. It helps me a lot. BTW, I would also like to know the columns of which is indexed.

    Thanks.

     

     

  • RE: Problem with Case

    Thanks Paul. It helps me a lot...:-D

     

  • RE: Cursor or the While loop?

    Thanks Anders!!!...that would be a great help

  • RE: Cursor or the While loop?

    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

  • RE: Cursor or the While loop?

    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)

  • RE: Cursor or the While loop?

    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...

  • RE: Cursor or the While loop?

    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...

Viewing 8 posts - 16 through 23 (of 23 total)