Viewing 15 posts - 421 through 435 (of 2,462 total)
Great, great work Drew. Very well done.
-- Itzik Ben-Gan 2001
October 6, 2016 at 8:37 am
ramyours2003 (10/4/2016)
I need recommendations for better performance of sql .we have 32bit SQL servers and want to make sure we have them configured optimally for performance. We...
-- Itzik Ben-Gan 2001
October 5, 2016 at 6:42 pm
amy26 (10/5/2016)
-- Itzik Ben-Gan 2001
October 5, 2016 at 9:05 am
Part of the SSRS setup is configuring a Report Server URL. This is something you can also do after SSRS is set up. The Report Server URL is where you...
-- Itzik Ben-Gan 2001
October 5, 2016 at 8:27 am
First, ditto everything Chris said.
How does SQL Server handle casts in the WHERE clause?
Not all that well. You are going to get an index scan instead of a,...
-- Itzik Ben-Gan 2001
October 4, 2016 at 8:15 pm
You could do this:
WHERE CONVERT(DATE, Getdate())
NOT BETWEEN TRY_CONVERT(monthbegindate, datetime) AND TRY_CONVERT(monthenddate, datetime)
-- Itzik Ben-Gan 2001
October 4, 2016 at 2:02 pm
drew.allen (10/4/2016)
-- Itzik Ben-Gan 2001
October 4, 2016 at 1:41 pm
sp_msforeachdatabase is undocumented and overrated. That said, let's say you wanted to create a table named SomeTable in each db, you could do so like this:
EXEC sp_msforeachdb
'
USE ?;
IF...
-- Itzik Ben-Gan 2001
October 4, 2016 at 1:24 pm
Perhaps something like this:
WHERE a.start_execution_date >= DATEADD(Hour,-4,getdate())
Edit: that's a "greater than or equal" sign above, it keeps messed up when I post.
-- Itzik Ben-Gan 2001
October 3, 2016 at 3:12 pm
drew.allen (10/3/2016)
Alan.B (10/3/2016)
Here's a couple examples:
DECLARE @myv VARCHAR(MAX) = 'AB,CD,EF,GH,IJ';...
-- Itzik Ben-Gan 2001
October 3, 2016 at 1:26 pm
Luis Cazares (10/3/2016)
Hi Alan, you're still missing the GetNumsAB definition. I'd be interested on checking out how everything works. 🙂
getnumsAB
CREATE FUNCTION dbo.GetNumsAB
(
@low bigint,
@high bigint,...
-- Itzik Ben-Gan 2001
October 3, 2016 at 1:25 pm
We have a script for exactly this kind of thing; have a look at nsplit2B which you can find here[/url].
Here's a couple examples:
DECLARE @myv VARCHAR(MAX) = 'AB,CD,EF,GH,IJ';
SELECT *...
-- Itzik Ben-Gan 2001
October 3, 2016 at 12:46 pm
Was this fixed in SSRS 2016?
It appears to be but I have not tested it. In BOL, for SSRS versions 2014 and earlier, it explicitly says for Chrome, "Printing and...
-- Itzik Ben-Gan 2001
October 3, 2016 at 12:33 pm
ok, quick update. There does not seem to be a limit (I know you can do 2048 for sure).
For fun, play around with this code:
-- one time setup
USE...
-- Itzik Ben-Gan 2001
September 30, 2016 at 2:40 pm
I was curious about this too and did a little research. There appears to be absolutely nothing about this out there about APPLY. Since APPLY is very similar to a...
-- Itzik Ben-Gan 2001
September 30, 2016 at 2:19 pm
Viewing 15 posts - 421 through 435 (of 2,462 total)