Viewing 15 posts - 1,171 through 1,185 (of 2,648 total)
hey,
hold on - wasn't this why hierarchyID types were invented ?
you can even use persisted computed columns to make it nice and fast.
you would need a 1 time hit...
January 28, 2020 at 1:13 pm
It's a good idea from Anthony, you might get even better performance if you also add an index to #TEMP:
IF OBJECT_ID('tempdb..#TEMP') IS NOT NULL
...January 27, 2020 at 3:47 pm
I think performance might improve if you add an index on SourceId including other columns in the query.
Try this and see if there is an improvement:
CREATE...
January 27, 2020 at 3:20 pm
No need for a cte:
update h
set h.Person = t.Person_To,
h.Pctg = t.Pctg_New
from...
January 24, 2020 at 4:44 pm
No need for a cte:
update h
set h.Person = t.Person_To,
h.Pctg = t.Pctg_New
from #holders h
...
January 24, 2020 at 4:32 pm
I would use a NOT EXISTS in some form
;WITH CTE AS
(
SELECT cs_subscription.cs_contactyominame AS 'Contact Name',
...
January 22, 2020 at 3:57 pm
Yeah, as you mention Jonathan, I could have multiplied from same table. Thats what i went on to do, but stupid as I am I then realised that I...
January 21, 2020 at 4:17 pm
Can't you multiply two matrices together from the same table?
I don't see why you need two different tables?
January 21, 2020 at 2:50 pm
Remarks
STRING_SPLIT inputs a string that has delimited substrings, and inputs one character to use as the delimiter or separator. STRING_SPLIT outputs a single-column table whose rows contain the substrings. The name...
January 20, 2020 at 11:04 pm
You need to speed up the statements that run after this stored procedure is called that are contained in the same transaction. Or, if you can, rearrange the calls to...
January 20, 2020 at 9:35 am
Could it be that the SP is called by long running processes (transactions) that are updating the same row (with the same [object_name]) and one of the transactions hasn't finished...
January 20, 2020 at 12:22 am
You could do it with a SQL Agent job and a call to DBMail.
January 19, 2020 at 12:09 am
;WITH cte AS
(
SELECT Revision_ID,
COUNT(*) CountParts
...
January 18, 2020 at 3:34 am
Another option is to use dynamic SQL. For any input parameters that are null the AND clause could be removed.
For example, if @PatientID were null you could remove this line...
January 16, 2020 at 8:34 pm
Viewing 15 posts - 1,171 through 1,185 (of 2,648 total)