Viewing 15 posts - 1,696 through 1,710 (of 8,731 total)
Keeping Phil's simple formula:
SELECT name = concat(First_Name, ' ', Last_Name),
Sports = STUFF(iif(Football = 'Y', '; Football','') + iif(Soccer = 'Y', '; Soccer','') + etc, 1, 2, '')
FROM YourTable;
January 3, 2017 at 1:30 pm
Just a small update.
--===== If the function already exists, drop it
IF OBJECT_ID(N'[dbo].[ifn_WorkDays]') IS NOT NULL
DROP FUNCTION [dbo].[ifn_WorkDays]
GO
GO
...
January 3, 2017 at 1:07 pm
Michael L John (1/3/2017)
I run this old legacy ETL process that nobody knows about, and nobody remembers, when this error...
January 3, 2017 at 12:29 pm
Chris Harshman (12/30/2016)
BOR15K (12/30/2016)
December 30, 2016 at 11:28 am
At first I thought it was spam.
Now, I'm surprised about the real Bobby Tables.:w00t:
December 30, 2016 at 10:56 am
You also have a TOP 1 without ORDER BY which might return inconsistent results.
You have a correlated subquery that might return more than one row and would eventually return the...
December 30, 2016 at 9:41 am
Jeff Moden (12/30/2016)
Luis Cazares (12/30/2016)
It's PERCENTILE_DISC or PERCENTILE_CONT which use OVER to define window and order.The median is the first example on the BOL page:
Very cool. Thanks.
On the two...
December 30, 2016 at 7:54 am
It's PERCENTILE_DISC or PERCENTILE_CONT which use OVER to define window and order.
The median is the first example on the BOL page:
December 30, 2016 at 7:42 am
Here are 2 other methods that seem to be faster.
WITH cteStepsTiles AS(
SELECT *, NTILE(2) OVER(PARTITION BY Rep, MileCode ORDER BY DeltaT) tile
FROM...
December 30, 2016 at 7:34 am
Do you have the Excel column set as Text before inserting the data? That would avoid a numeric format.
December 30, 2016 at 7:12 am
Revenant (12/29/2016)
Grumpy DBA (12/29/2016)
jasona.work (12/29/2016)
PigBacon
Kevin
McCallister
December 29, 2016 at 1:09 pm
mw112009 (12/29/2016)
THOM A: I wanted you to modify the code for me.. (Please )Never mind!
Done!
It works!
No Help needed.
Sure, it works. But, do you believe it's efficient? You're reading the...
December 29, 2016 at 8:03 am
Two ideas come to my mind.
1. You have 2 variables and you're populating one and showing another one (SSIS can cause these confusions).
2. Your variable wasn't correctly set in the...
December 28, 2016 at 1:13 pm
jason.shaw (12/28/2016)
December 28, 2016 at 12:48 pm
1. How are you populating your variable? If the variable is not populated correctly, it will always show 0 (or the initial value that you have set).
2. The warnings are...
December 28, 2016 at 10:47 am
Viewing 15 posts - 1,696 through 1,710 (of 8,731 total)