Viewing 15 posts - 3,841 through 3,855 (of 7,614 total)
April 10, 2017 at 2:53 pm
Here's the function to compute any given day for any given month:
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
GO
CREATE FUNCTION dbo.GetFirstGivenDayOfMonth (@month date, @day tinyint...
April 10, 2017 at 11:22 am
I don't think you need a cursor for the index checks, although it's probably easiest to use a cursor to go thru the databases. See if the code below will...
April 10, 2017 at 11:14 am
April 10, 2017 at 10:09 am
An inline function is a good idea, but I'll leave it scalar for now so you can just replace your existing function. I would definitely not use I/O to do...
April 10, 2017 at 9:44 am
Cluster the header table on the date column.
Cluster the detail table on the key from the header table. Get the key/fk by querying the header table first.
Edit: On the...
April 10, 2017 at 7:59 am
April 10, 2017 at 7:29 am
April 7, 2017 at 2:29 pm
April 7, 2017 at 2:26 pm
April 6, 2017 at 1:17 pm
1) Technically, no, since clus key column(s) are automatically included in all non-clus indexes. But I like to explicitly code it when it's needed to make this index a...
April 6, 2017 at 8:30 am
April 5, 2017 at 1:10 pm
Presumably the lower number is always first for single entries (if not, fix that! 🙂 ).
SELECT L.*
FROM Links L
WHERE L.ClientRef < L.LinkedClientRef
April 5, 2017 at 10:44 am
Agree. something like below. Keep the trigger code as efficient as possible. (Btw, cluster the new table on LOG_TIME first, to make processing and clean up of that table easier.)
April 4, 2017 at 3:49 pm
April 4, 2017 at 3:09 pm
Viewing 15 posts - 3,841 through 3,855 (of 7,614 total)