Viewing 15 posts - 1 through 15 (of 71 total)
But I don't know the rest, Jeff - what do you mean?
June 19, 2022 at 10:32 am
I use stored procedures for ease of amending. But only for more involved queries, and very rarely for the queries that build the SSRS parameter lists of values. The one...
June 12, 2022 at 4:46 pm
That would actually be easy for me to implement as so happens the proc is a loop - for batch processing with each batch in a transaction. As long as...
February 10, 2022 at 3:07 pm
Great, thanks both. Should be able to do it now. Want to avoid looking in on Monday morning and finding the job is still running!
February 10, 2022 at 2:58 pm
Thanks Grant. I presume there are sys tables for jobs and job activity. Not sure if I then do sp_stop_job or KILL process.
February 10, 2022 at 2:52 pm
Should have added. The job is simply executing a stored procedure.
February 10, 2022 at 11:40 am
SELECT 1 SELECT 2
This parses and executes in SSMS with only a space as separator.
February 3, 2022 at 12:57 pm
How does the parser separate statements when semicolons are not used?
February 3, 2022 at 9:25 am
If the semicolon is required for some (new) statements, consistency would mean using it throughout. But we have a mixture and I can't see that changing.
I know that the semicolon...
February 1, 2022 at 8:32 pm
Thanks.
FROM dbo.tblOrders t
INNER JOIN deleted d ON d.OrderID=t.OrderID
I was thinking it was:
FROM dbo.tblOrders t
LEFT JOIN deleted d ON d.OrderID=t.OrderID
or
FROM inserted i
LEFT JOIN deleted d ON i.OrderID=d.OrderID
January 20, 2022 at 6:55 pm
Good, I couldn't understand why the join was there.
Scott - I would want to log all columns, but only if one or more of the values have changed. An UPDATE...
January 20, 2022 at 5:22 pm
Thanks. The first one is simple and a good starting point for me.
Why in the below is it necessary to join back to tblOrders?
create trigger tblTriggerAuditRecord on...
January 20, 2022 at 4:48 pm
As said above, if possible I would store start and end datetime rather than duration. I've had a similar helpdesk case - you store a calculated duration and then someone...
November 22, 2021 at 7:45 pm
Yes, the two-part method seems to be safer, from Jeff's article. It concludes with recommending an anchor but I couldn't find any examples of this earlier in the article so...
October 25, 2021 at 4:55 pm
Got it working with a version of the Quirky Update, so thanks to Jeff Moden.
Changed it to a temp table rather than table variable and ThisDate is a clustered index....
October 25, 2021 at 3:14 pm
Viewing 15 posts - 1 through 15 (of 71 total)