Viewing 15 posts - 226 through 240 (of 2,610 total)
Why do you say "Expected output would be something along these lines"?
You only have 6 rows in your input data, surely it can't be too difficult to type the expected...
November 10, 2023 at 7:11 pm
So what is the output you are expecting from that input?
All you need to do is provide a list of the rows you expect from your input.
The outputs you have...
November 10, 2023 at 6:57 pm
So what is the output you are expecting from that input?
Also, there is an error in your script. Surely it isn't difficult to paste it into SSMS and check it...
November 10, 2023 at 6:29 pm
It's quite simple really. All we want is a short script that creates the input data, then the results you expect from that input data.
November 10, 2023 at 3:57 pm
What happened to the times 2023-01-01 01:23:45 to 2023-01-01 02:34:56 in your input?
Shouldn't they also be in the output?
November 9, 2023 at 7:01 pm
So what is the expected output, that you don't know how to get, from your script above?
November 9, 2023 at 6:25 pm
TechnicianID StartTime EndTime BlockStart BlockEnd TotalDurationSeconds ProductiveSeconds 1 2023-10-01 05:00:00 2023-10-01 05:10:00 2023-10-01 05:00:00 2023-10-01 05:15:00 600 600 1 2023-10-01 05:10:00 2023-10-01 05:25:00 2023-10-01 05:00:00 2023-10-01 05:15:00 900 300...
November 9, 2023 at 3:48 pm
I asked ChatGPT to script it:
-- Drop the temporary table if it exists
DROP TABLE IF EXISTS #SomeTab;
-- Create the temporary table
CREATE TABLE #SomeTab (
...
November 9, 2023 at 11:34 am
From ChatGPT:
It seems that you need a workaround for the "calendar" table that is going away. In your updated code, you tried using @mydate and a "currentdate" table without populating...
November 1, 2023 at 4:12 pm
sys.dm_exec_requests and sys.dm_os_waiting_tasks dynamic management view provide more detailed information about the wait types and wait resources, making it easier to diagnose performance issues.
October 28, 2023 at 10:31 pm
Have you got a clustered index on the table? You can do a single table scan and insert the values of the clustered index key that need to be deleted...
October 23, 2023 at 3:02 pm
You can just shrink it a bit at a time. So instead of trying to shrinking it from 2.6 TB to 500 GB in one go just try making it...
October 18, 2023 at 9:45 pm
SELECT *
FROM [Prod_ShiftSummary]
WHERE entrydate >= (
SELECT CONVERT(date, MAX(EntryDate))
FROM [Prod_ShiftSummary]
where office = 'baytown'
) ;
October 18, 2023 at 5:06 pm
SELECT ap_claim_idM,
MAX(CASE WHEN ap_claim_icd_prcdr_sequence_number = 1 THEN icd_prcdr_code END) AS Code1,
MAX(CASE WHEN ap_claim_icd_prcdr_sequence_number...
October 17, 2023 at 2:31 am
Thanks all. I can confirm that the code is not being called in a loop, or in an explicit transaction. The parent procedure sproc_ValidateUser just performs some basic validation...
October 12, 2023 at 8:33 pm
Viewing 15 posts - 226 through 240 (of 2,610 total)