Viewing 15 posts - 3,946 through 3,960 (of 7,610 total)
You might be able to do something simpler, depending on your specific data and requirements:
SELECT
[Keys],
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
...
February 21, 2017 at 12:14 pm
Btw, I also added a clause to the TAC join:
LEFT JOIN [dbo].[Contacts] TAC WITH (NOLOCK) ON SAC.Owner_Id IS NULL AND ...
You might gain some slight efficiency...
February 20, 2017 at 12:53 pm
Look for articles or books by Itzik Ben-Gan. The books are better overall for training, although they will cost you a few dollars.
February 20, 2017 at 12:16 pm
SELECT S.Id,
T.Id,
COALESCE(SAC.Contacts_Id, TAC.Contacts_Id) AS AssignedContacts_Id,
COALESCE(SAC.OwnerType, SAC.OwnerType) AS OwnerType,
COALESCE(SAC.ContactsId, TAC.ContactsId) AS ContactsId,
COALESCE(SAC.Description, TAC.Description) AS Description
FROM [dbo].[ChildTable1] S WITH...
February 20, 2017 at 12:13 pm
You can use a CROSS APPLY to adjust the row to make it much easier to analyze values. I can't give you more details than this right now because your...
February 20, 2017 at 10:40 am
You need to look at some actual stats, from the system views SQL provides, rather than just guessing.
The sys.dm_db_index_* and sys.dm_db_missing_index_* views can give you valuable stats on...
February 20, 2017 at 10:39 am
You don't want to store a string, use a numeric code instead; strings would be a huge waste of resources and are harder to change Also, I'd separate the present/not...
February 20, 2017 at 10:26 am
February 17, 2017 at 9:02 am
February 17, 2017 at 8:32 am
February 17, 2017 at 8:24 am
February 16, 2017 at 4:54 pm
You could add a unique identity column without touching the existing primary key, and that identity value would still allow you to join the deleted and inserted tables accurately.
February 16, 2017 at 4:48 pm
How is the table clustered? If it's clustered on the date, you'll be fine, just run one DELETE at a time for a decent-sized chunk of rows, 20000...
February 16, 2017 at 4:38 pm
Yes, inner joins like that are still valid because they are still unambiguous and thus 100% logically valid. Equi-joins function exactly the same using WHERE joins...
February 16, 2017 at 10:08 am
You could get an initial page split. But after that, SQL detects that incoming values are sequential and shouldn't do another page split unless you overlap other existing rows.
February 15, 2017 at 3:44 pm
Viewing 15 posts - 3,946 through 3,960 (of 7,610 total)