Viewing 15 posts - 871 through 885 (of 2,462 total)
It will increase performance if the index is used by the optimizer for SELECT statements. Say the column name is C1 and you execute: SELECT C1 FROM youratable......
-- Itzik Ben-Gan 2001
April 5, 2016 at 6:14 am
Using GetNumsAB[/url], this may be better:
WITH base AS
(
SELECT rn, d = DATEADD(DAY,n2,mn), mn = DATEADD(DAY,rn,mn), mx = DATEADD(DAY,n1,mn)
FROM
(
SELECT...
-- Itzik Ben-Gan 2001
April 4, 2016 at 8:38 pm
If you had 2012 this would be much easier. I have to think about this a little; the most straight-forward solution is a "triangular join" that looks like this:
WITH...
-- Itzik Ben-Gan 2001
April 4, 2016 at 8:04 pm
WhiteLotus (4/4/2016)
I am about to migrate some databases consist of user databases and also Report server and Report server TempDB from 1 server to another server
Question :
The destination server...
-- Itzik Ben-Gan 2001
April 4, 2016 at 7:27 pm
I can't stand living in Chicago anymore so, yes! If I have to live in the Midwest, Chicago is the place to be but I don't want to live in...
-- Itzik Ben-Gan 2001
April 4, 2016 at 7:01 pm
phingers (4/4/2016)
I have an SSIS package which emails data in XML file format to an external company on a regular basis.
They have requested that we allow them access to our...
-- Itzik Ben-Gan 2001
April 4, 2016 at 1:29 pm
ben.brugman (4/4/2016)
Any other advises here about extending the 8K version ?
...Remark, I started this new thread because I think this subject of enlarging the capacity of the...
-- Itzik Ben-Gan 2001
April 4, 2016 at 8:41 am
DesNorton (3/31/2016)
Alan.B (3/30/2016)
-- Itzik Ben-Gan 2001
April 1, 2016 at 8:38 am
Ed Wagner (3/31/2016)
Alan.B (3/30/2016)
-- Itzik Ben-Gan 2001
March 31, 2016 at 10:05 pm
ScottPletcher (3/31/2016)
Alan.B (3/30/2016)
Alan.B (3/30/2016)
ScottPletcher (3/30/2016)
Alan.B (3/30/2016)
ScottPletcher (3/30/2016)
Alan.B (3/29/2016)
Lastly, ditto the last Thursday of the month:
SET STATISTICS IO ON;
PRINT 'Old way:';
SELECT DISTINCT MAX([Date]) OVER (PARTITION BY [Year],[MonthName],[WeekdayName]) AS [Date]
FROM ...
-- Itzik Ben-Gan 2001
March 31, 2016 at 7:40 pm
mceventphoto (3/31/2016)
Drew,I like your solution better. It is short and clean.
Thanks,
MC
Did you look at the Translate8K solution?
DECLARE @RandomString varchar(100) = '0123456789000';
SELECT dbo.Translate8K(@RandomString,'1234567890','ABCDEFGHI$');
-- Returns: $ABCDEFGHI$$$
-- Itzik Ben-Gan 2001
March 31, 2016 at 3:27 pm
If you are just pulling out the email addresses this is certainly something that can be resolved with a simple splitter, CHARINDEX, PATINDEX and a couple other simple tricks. I'll...
-- Itzik Ben-Gan 2001
March 31, 2016 at 10:47 am
Sergiy (3/30/2016)
1. Create a "translation" table:
CREATE TABLE #Mapping (
FromChar NCHAR(1) PRIMARY KEY,
ToChar NCHAR(1)
)
INSERT INTO #Mapping ( FromChar, ToChar )
SELECT 1, 'A'
UNION ALL
SELECT 2, 'B'
UNION ALL
SELECT...
-- Itzik Ben-Gan 2001
March 31, 2016 at 10:08 am
Powershell is cool. I only worked with it once for about 10 weeks scripting out a SQL Server Install in the Google cloud using the Google SDK. As some people...
-- Itzik Ben-Gan 2001
March 30, 2016 at 9:54 pm
This is the kind of thing that you can do with a Translate function (which T-SQL does not have). I generally don't like scalar UDFs but this guy is faster...
-- Itzik Ben-Gan 2001
March 30, 2016 at 8:44 pm
Viewing 15 posts - 871 through 885 (of 2,462 total)