Viewing 15 posts - 3,556 through 3,570 (of 7,614 total)
WHERE column_name LIKE '1[67]-Nov-2017%' /* or '%1[67]-Nov-2017%' if the column doesn't start with the day */
February 8, 2018 at 10:32 am
Edit: Sorry about the formatting. The site automatically "adjusts" (corrupts!) multiple spaces into fewer spaces.
SELECT start_date, end_date,
CASE WHEN start_date >= '20140101' OR...
February 8, 2018 at 10:11 am
It's wasteful to store monthly, quarterly and yearly data in a daily table (actually, it's wasteful to store days in a year anywhere, since your year is a calendar year). ...
February 7, 2018 at 11:55 am
I never expect compression to be available though because...
February 7, 2018 at 7:56 am
February 6, 2018 at 2:10 pm
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
Viewing 15 posts - 3,556 through 3,570 (of 7,614 total)