Forum Replies Created

Viewing 15 posts - 106 through 120 (of 130 total)

  • RE: Conditional Aggregation

    I haven't run your code yet but I think I've found my solution - I had an epiphany this morning (I have to check specific wells to make sure that...

  • RE: Conditional Aggregation

    I'll run this against the whole dataset and see how long it takes.

    I revised that cursor-based code that I put up yesterday to use one query in the update statement....

  • RE: Conditional Aggregation

    Re. Building the Sequence number.

    You've got it right.

  • RE: Conditional Aggregation

    Re. Cursor being slow.

    I stopped the process after 36 minutes. I then ran the query which finds the N records to be aggregated. It returned about 46,000 at...

  • RE: Conditional Aggregation

    I resurected some old cursor-based code which I've used in the past and modified it for this process. It's terribly slow but maybe it contains the kernel of an...

  • RE: Conditional Aggregation

    The upload thing is kind of vexing. I figured out how to get around the unicode thing (Management studio just assumes everyone want's to export everything in unicode and...

  • RE: Conditional Aggregation

    I'm not sure what I did but I think I managed to upload a version of the csv which I'd looked at in Excel and then saved.

    I'm having trouble uploading...

  • RE: Conditional Aggregation

    Yes. in this instance null is effectively zero.

  • RE: Conditional Aggregation

    Lol!

    We've tumbled to the same problem at almost the same instant!

  • RE: Conditional Aggregation

    I had gotten this far;

    SELECT

    CUR.HoleId

    ,CUR.EvalNum

    ,PREV.TopDepth

    ,NEX.BaseDepth

    ,CAST((((PREV.MBit * PREV.Length) + (CUR.MBit * CUR.Length) + (NEX.MBit * NEX.Length)) / (PREV.Length + CUR.Length + NEX.Length)) AS NUMERIC(3,2)) AS MBit

    ,CAST((((PREV.PHIE * PREV.Length) + (CUR.PHIE *...

  • RE: Conditional Aggregation

    Ive been trying to upload the full data file (4mb zipped) and there seems to be something wrong with the upload utility right now.

    I'll try again in a couple of...

  • RE: Conditional Aggregation

    Hi Old Hand;

    Thanks for your time on this.

    I don't know how many times the aggregation would have to be itterated. It sort of depends on what the initial criteria...

  • RE: Conditional Aggregation

    Length (it should actually be [interval] thickness rather than length - My bad on the naming) weighted average is calculated like this;

    ((Prev.MBit * Prev.Length)

    + (Cur.MBit * Cur.Length)

    + (Nex.MBit * Nex.Length))

    /(Prev.Length...

  • RE: Conditional Aggregation

    I'm not sure what you mean by bound by. If you mean that I can join the table to it's self like this

    FROM ##TEMP CUR

    LEFT JOIN ##TEMP PREV

    ON...

  • RE: Conditional Aggregation

    The table I'm working with is acutally a temporary table I've created from the source data which has been quite processed to get it to this point.

    The table definition below...

Viewing 15 posts - 106 through 120 (of 130 total)