Viewing 15 posts - 61 through 75 (of 10,144 total)
Which method of running total is the report currently using?
Have you considered using SUM() OVER()?
Whichever method you're using, indexing will profoundly affect the query velocity.
February 4, 2020 at 1:22 pm
OK, so I'm curious and interested in expanding my repertoire when it comes to liquor...
Whiskey / whisky vs scotch, and, what's so bad about Jack D?
(Note, I've only recently...
January 31, 2020 at 2:13 pm
Oh and Ed Wagner, if you're reading this - I tried your recommendation of bacon and it's absolutely wonderful, thank you so much matey.
Thank you so much for...
January 31, 2020 at 10:59 am
Did someone mention food?
please don't start this - as much as I love food, i'm sick of it at the minute - i'm forced to eat nearly 5000...
January 30, 2020 at 4:43 pm
Did someone mention food?
January 30, 2020 at 4:07 pm
SELECT city,
COUNT(*)
FROM gcdf_DB..PeopleContactInfo
GROUP BY City
SELECT city,
COUNT(DISTINCT PeopleID)
FROM gcdf_DB..PeopleContactInfo
GROUP BY...
January 2, 2020 at 3:50 pm
If some conditions are met...
https://sqlperformance.com/2018/02/sql-plan/setting-and-identifying-row-goals
November 14, 2019 at 3:56 pm
Please post an actual (as opposed to estimated) execution plan as a .plan attachment. You can use your plan interpreter to mask real table names if necessary. Do this after...
November 12, 2019 at 8:43 am
SELECT
get_customeVal_3 = ISNULL(SUM(CASE WHEN year_num = @year1 AND chart_code = '3' THEN close_amt ELSE 0 END),0)
- ISNULL(SUM(CASE WHEN year_num = @year1 AND chart_code = '36101' THEN...
November 7, 2019 at 4:26 pm
Hello, below is the data before filtering out, if you see A-06/11/2019 9:15 between A-06/11/2019 9:10 and A-06/11/2019 9:25, that's why it is not showing in end result. It...
November 7, 2019 at 12:54 pm
;WITH MyTable AS
(
SELECT * FROM (VALUES
('A', '06/11/2019 09:00', '06/11/2019 09:15'),
('A', '06/11/2019 09:05', '06/11/2019 09:20'),
('A', '06/11/2019 09:10', '06/11/2019 09:25'),
('A', '06/11/2019 09:15', '06/11/2019 09:30'),
('B', '06/11/2019 09:05', '06/11/2019 09:20'),
('B', '06/11/2019...
November 7, 2019 at 11:13 am
ChrisM@Work wrote:SELECT
[LastDayOfThisMonth] = EOMONTH(GETDATE()),
[SecondLastDayOfThisMonth] = DATEADD(DAY,-1,EOMONTH(GETDATE()))
I think EOMONTH was introduced in SQL 2012 and this is the SQL 2008 board.
Good catch Jonathan, thanks.
October 31, 2019 at 2:55 pm
-- Avoid DISTINCT, it almost always invokes a SORT.
-- Avoid reading tables more times than is necessary
SELECT -- DISTINCT
H.Customs_Entry_Num as [Entry Num]
,H.Entry_Summary_Date
,L.Part_Num
,L.HTS_Num
,l.HTS_Value
,L.Line_Item_Duty AS Duty
,z.HTS_NUMBER
,z. PTNR_ID
,z.ELIGIBILITY
,z.Created_Date
,z.COMPOSITE_PART
FROM ADHOC.ATS_ESH H
INNER JOIN adhoc.ATS_ESL L
ON...
October 31, 2019 at 2:24 pm
SELECT
[LastDayOfThisMonth] = EOMONTH(GETDATE()),
[SecondLastDayOfThisMonth] = DATEADD(DAY,-1,EOMONTH(GETDATE()))
October 31, 2019 at 2:10 pm
Viewing 15 posts - 61 through 75 (of 10,144 total)