Viewing 15 posts - 3,556 through 3,570 (of 7,609 total)
February 6, 2018 at 10:03 am
February 5, 2018 at 3:26 pm
That's an Itzik Ben-Gap "Gaps and Islands" query. Sorry, I don't have time now to fully flesh it out, but someone should come along shortly who can.
February 5, 2018 at 11:29 am
What is the underlying table clustered on? If it's clus on identity, you should seriously consider clustering instead by date first, esp. if you (almost) always look up by date,...
February 5, 2018 at 11:27 am
I don't get any syntax errors. That error must be because of some text/code before or after the main code.
But you will likely get exec errors, since the...
February 5, 2018 at 10:05 am
Btw, you might want to seriously consider using "UNION ALL" there rather than UNION. I think you are going to force a massive sort of all the rows by using...
February 2, 2018 at 8:36 am
You're welcome! I'm very glad it helped.
February 1, 2018 at 9:20 am
SELECT DATEADD(DAY, -DATEDIFF(DAY, 0, [Order Date]) % 7, [Order Date]) AS [Week of],
COUNT(*) AS Count
FROM dbo.your_table_name
GROUP BY DATEADD(DAY, -DATEDIFF(DAY, 0, [Order Date]) %...
February 1, 2018 at 7:58 am
You should pre-allocate enough log space to handle the request. The alter should be much faster if the log does not have to dynamically expand. You should do the expansion in...
February 1, 2018 at 7:53 am
You should only rebuild a 60GB index if and when you have a really, really compelling reason.
I'd suggest specifying "SORT_IN_TEMPDB = ON" for large rebuilds, unless you have...
January 30, 2018 at 3:44 pm
Great, thanks! See if something like this is a good start to what you need.
Btw, if the call table is clustered first on StartTime (as it almost certainly should...
January 30, 2018 at 11:38 am
If you'd provide some usable sample data -- CREATE TABLE and INSERT statements -- for QueueCallItems, I (and others) can code something up. Sorry, but I just don't have additional...
January 30, 2018 at 10:39 am
SELECT SCHEMA_NAME(t.schema_id) AS schema_name,
t.name AS table_name,
c.name AS column_name,
c.max_length,
c.is_nullable,
c.is_computed
FROM sys.columns c
INNER...
January 30, 2018 at 10:09 am
January 27, 2018 at 5:45 am
Sergiy - Friday, January 26, 2018 8:41 AMWasn't it answering your question?https://www.sqlservercentral.com/Forums/FindPost1920045.aspx
No. You need to put some thought into the actual...
January 26, 2018 at 4:58 pm
Viewing 15 posts - 3,556 through 3,570 (of 7,609 total)