Viewing 15 posts - 436 through 450 (of 2,462 total)
HappyGeek (9/30/2016)
Eirikur Eiriksson (9/30/2016)
Manic Star (9/30/2016)
djj (9/30/2016)
ChrisM@Work (9/30/2016)
Kaye Cahs (9/30/2016)
djj (9/29/2016)
Grumpy DBA (9/29/2016)
HappyGeek (9/29/2016)
CoatPaint
Brush
Hair
Today
Tomorrow
Evening
Deadline
target
Costco
-- Itzik Ben-Gan 2001
September 30, 2016 at 12:55 pm
Is it possible that you could post the actual execution plan instead of the estimated plan? That will tell us much more. What you posted may not be the plan...
-- Itzik Ben-Gan 2001
September 30, 2016 at 10:11 am
I'm out of time but perhaps this can get you started. You can use DelimitedSplit8K_LEAD (see link in my signature) to parse the string like this:
SELECT ItemNumber, item =...
-- Itzik Ben-Gan 2001
September 29, 2016 at 2:48 pm
Can you really be an effective BI professional without C# [or front-end] development skills?
YES.
I've been a BI Developer/Architect/Consultant for ~7 years and I am a total .NET language novice. Front...
-- Itzik Ben-Gan 2001
September 28, 2016 at 8:08 pm
I, too, had a real hard time with this, it took me a long time to find where/how to download Dev Edition. I remember that that key was to be...
-- Itzik Ben-Gan 2001
September 28, 2016 at 7:39 pm
Provided you can get away with up to 2 clock_in's and clock_out's per person/date you can do this:
WITH Prep AS
(
SELECT
creation_date = CAST(creation_date...
-- Itzik Ben-Gan 2001
September 28, 2016 at 1:48 pm
This should not be hard, I'm looking at this now.
In the meantime, in case people want easily consumable sample data...
SELECT * INTO dbo.test
FROM
(
VALUES ('168780','10148','16477','7/21/2016 15:00','CLOCK_OUT','1','DAY','RICHAR'),
...
-- Itzik Ben-Gan 2001
September 28, 2016 at 1:23 pm
Eirikur beat me to it on the POC index - that's always the first thing I look for when a window function makes a query much slower.
I would add...
-- Itzik Ben-Gan 2001
September 28, 2016 at 11:58 am
What you are doing does not make much sense. Perhaps you could post some sample data and your desired results and we can point you in the right direction.
a...
-- Itzik Ben-Gan 2001
September 28, 2016 at 11:23 am
Yay. I got one right.
Personally I'd simplify this one like this:
SELECT
DATEADD(YEAR, N, CONVERT(DATE, v.HolidayDate)) AS HolidayDate,
HolidayName
FROM (VALUES ('12/25/2016', 'Christmas Day')) AS v (HolidayDate, HolidayName)
CROSS...
-- Itzik Ben-Gan 2001
September 28, 2016 at 9:43 am
Lynn Pettis (9/27/2016)
mister.magoo (9/27/2016)
Lee Hopkins (9/27/2016)
I wan to use this result to create a declared table
DECLARE @listStr...
-- Itzik Ben-Gan 2001
September 27, 2016 at 6:46 pm
A lot of good advice here, especially
The best way to get better at writing T-SQL is to write a lot of T-SQL.
Over the years I have created dozens of...
-- Itzik Ben-Gan 2001
September 27, 2016 at 6:28 pm
I have no idea what you're trying to do but it seams simple. Please post your desired results. On a side note -
This:
and (cm.Original like'6%' or cm.Original like '7%' or...
-- Itzik Ben-Gan 2001
September 27, 2016 at 6:10 pm
Building off of what Scott said - a table variable is not the best choice for what you are doing because it can't be referenced outside of the dynamic SQL...
-- Itzik Ben-Gan 2001
September 27, 2016 at 10:45 am
For fun, here's another option. This is a function I created a couple months ago which uses NGrams8K[/url]. The function allows you to grab everything between the mth and nth...
-- Itzik Ben-Gan 2001
September 26, 2016 at 12:08 pm
Viewing 15 posts - 436 through 450 (of 2,462 total)