Forum Replies Created

Viewing 15 posts - 31 through 45 (of 686 total)

  • Reply To: Group records during capture

    Using this above query

    select *, DATEADD(s,t_stamp/1000,'1969-12-31 19:00:00') as 'DateRecorded'

    from #sqlt_data_1_2024_cpy t

    cross apply dbo.msUnixTStoDATETIME2(t.t_stamp) jm_unx_tstamp

    cross apply (values (cast(dateadd(millisecond, t.t_stamp%1000, dateadd(second, t.t_stamp/1000, '1970-01-01')) as datetime2(3)))) v(ss_dt)

    How could I last 15 minutes of...

  • Reply To: Group records during capture

    That would be true if working with a Normal date, but the Unix-Timestamp stored in T_stamp needs converted I'm thinking.

     

  • Reply To: Group Delete

    any examples using a loop and batchsize

    Thanks.

  • Reply To: Group Delete

    thanks any examples for the loop used and batch delete size

  • Reply To: Table Delete

    Jonathan AC Roberts,

    I was wondering If I could ask another question. I have a very similar cleanup to perform based off a CostKey found in 2 tables. I built a...

  • Reply To: Table Delete

    Currently deleting using by day

    WHERE SpoolStartDt = '2022-09-30 00:00:00.000';

    How could I delete a MONTH at a time..

    Thanks.

  • Reply To: Table Delete

    27Million

    58,000 per day

  • Reply To: Table Delete

    Thanks again this table is standalone ..

  • Reply To: Table Delete

    Perfect  .. works great ..

    Many Thanks...

  • Reply To: Table Delete

    This is throwing an error:

    -- Populate the batch table with the next set of IDs to delete

    DELETE TOP (@BatchSize)

    OUTPUT DELETED.Id INTO #BatchToDelete

    FROM #ToDelete;

     

    Msg 102, Level 15, State 1, Line 27

    Incorrect...

  • Reply To: Table Delete

    JoNathan can your example include 2 fields I mention above? so I could use a 4hr window as also suggested.

    Thanks.

    • This reply was modified 10 months, 1 week ago by Bruin.
  • Reply To: Table Delete

    Looks like I need both of these fields for startdt and starttime

    [SpoolStartDt] [datetime] NULL,

    [SpoolStartTime] [time](7) NULL,

    example:

    2022-02-23 00:00:00.000

    16:41:00.0000000

  • Reply To: query help

    Thanks just didn't know if using the CTE would cause any issue with multi process.. It seems fast .. doing some testing..

    Thanks for quick responses.

  • Reply To: query help

    Would the cte version run into any contention if this was called multiple times concurrently?

    The process that would use this logic runs 16 threads using this cte query and just...

  • Reply To: query help

    thanks for your suggestions.

Viewing 15 posts - 31 through 45 (of 686 total)