Forum Replies Created

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

  • RE: Copy data from a flat file to a temporary table

    I believe that the source of my problem is that I (and the users who will use this SQL script) do not - and would never be permitted to -...

  • RE: Copy data from a flat file to a temporary table

    I'm effectively using a simple sql script with variables and hoping to pass in the name of the CSV in one of the variables.

    Something like this

    IF OBJECT_ID(N'TempDb..#SCOPE',N'U') IS NOT NULL...

  • RE: Conditional Aggregation

    I think that the difference is attributable to the where clause where we are comparing the length value of the N row to the length of the bounding Y rows.

    I'm...

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

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