Viewing 15 posts - 31 through 45 (of 686 total)
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...
December 13, 2024 at 10:43 am
That would be true if working with a Normal date, but the Unix-Timestamp stored in T_stamp needs converted I'm thinking.
December 10, 2024 at 6:28 pm
thanks any examples for the loop used and batch delete size
December 7, 2024 at 12:28 am
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...
December 6, 2024 at 5:01 pm
Currently deleting using by day
WHERE SpoolStartDt = '2022-09-30 00:00:00.000';
How could I delete a MONTH at a time..
Thanks.
November 17, 2024 at 9:13 pm
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...
November 16, 2024 at 1:15 pm
JoNathan can your example include 2 fields I mention above? so I could use a 4hr window as also suggested.
Thanks.
November 15, 2024 at 7:18 pm
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
November 15, 2024 at 7:15 pm
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.
November 11, 2024 at 1:39 pm
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...
November 11, 2024 at 12:51 pm
Viewing 15 posts - 31 through 45 (of 686 total)