Viewing 15 posts - 1,771 through 1,785 (of 10,144 total)
Hugo Kornelis (2/5/2016)
February 5, 2016 at 9:39 am
drew.allen (2/5/2016)
Hugo Kornelis (2/5/2016)
ChrisM@Work (2/5/2016)
ORDER BY MC.TerminationDate, MC.EffectiveDate DESC
I didn't go over all your modifications, but this one just struck my eye.
I think you intended this to be:
ORDER BY MC.TerminationDate...
February 5, 2016 at 8:02 am
Hugo Kornelis (2/5/2016)
ChrisM@Work (2/5/2016)
ORDER BY MC.TerminationDate, MC.EffectiveDate DESC
I didn't go over all your modifications, but this one just struck my eye.
I think you intended this to be:
ORDER BY MC.TerminationDate DESC,...
February 5, 2016 at 2:26 am
Some observations to add to SpaghettiDBA's comments:
1.Remove any unnecessary tables from the FROM list. Begin with the two left-joined views. Since they are left joins, they cannot restrict the output,...
February 5, 2016 at 2:12 am
Luis Cazares (2/4/2016)
Chris,Is there any particular reason for using 1900 + DATEDIFF(YEAR,0,GETDATE()) instead of YEAR(GETDATE()) ?
No - thanks for pointing this out Luis. I was in the middle of building...
February 4, 2016 at 9:35 am
I agree with Luis, at least one of your columns is INT. Try this:
SELECT *,
CAST(
CAST(x.ThisYear AS char(4)) +
RIGHT('0'+CAST(Fiscal_Year_End_Month_Nbr AS varchar(2)),2) +
RIGHT('0'+CAST(Fiscal_Year_End_Day_Nbr AS varchar(2)),2)
AS datetime)
FROM ( -- sample...
February 4, 2016 at 9:02 am
kkbear (2/4/2016)
CAST(b.Fiscal_Year_End_Month_Nbr + '/' + b.Fiscal_Year_End_Day_Nbr as datetime) as [Fiscal...
February 4, 2016 at 8:43 am
Or using the hardcoded crosstab model, this - which I find much easier to manipulate than dynamic SQL.
;WITH ExtraGroup AS (
SELECT LOB, Attribute, Value, grp = ROW_NUMBER() OVER (PARTITION...
February 4, 2016 at 8:15 am
Try this filter:
WHERE run_time BETWEEN 0 AND 300
February 4, 2016 at 6:03 am
Stuart Davies (2/4/2016)
BL0B_EATER (2/4/2016)
ChrisM@Work (2/4/2016)
Luis Cazares (2/3/2016)
This got me by surprise. I'm not searching for jobs, but it got my attention because it was totally unexpected (but possibly logical).
Stuart's BS...
February 4, 2016 at 5:23 am
Brandie Tarvin (2/4/2016)
Stuart Davies (2/4/2016)
BL0B_EATER (2/4/2016)
ChrisM@Work (2/4/2016)
Luis Cazares (2/3/2016)
February 4, 2016 at 5:21 am
SteveD SQL (2/4/2016)
In most of my tables I have Active and Inactive columns as most of the time I can DELETE record I just need to 'inactivate' them.
I was...
February 4, 2016 at 4:12 am
Better still, write it in a way which is most likely to be performant as well as correct. It's very little extra work:
-- SARGable Solution
DECLARE @StartDate DATETIME = '20130101'; --...
February 4, 2016 at 2:02 am
Luis Cazares (2/3/2016)
This got me by surprise. I'm not searching for jobs, but it got my attention because it was totally unexpected (but possibly logical).
Stuart's BS guru would be a...
February 4, 2016 at 1:28 am
silverbullettruck (2/3/2016)
February 3, 2016 at 9:35 am
Viewing 15 posts - 1,771 through 1,785 (of 10,144 total)