Viewing 15 posts - 946 through 960 (of 3,505 total)
So what do you really want to do?
Modify the subscription so it changes when the report is delivered? If so, see the "Schedule" section of this article:
July 19, 2019 at 10:05 pm
Sorry for the silly question, but if you do everything in a stored procedure, what's the difference? Maybe you have a CTE with two pivots in it, and then at...
July 19, 2019 at 4:08 pm
Not totally sure I understand. Can you create two pivots and then join the results on the shared columns?
July 19, 2019 at 3:31 pm
Something like this... I'm not sure my query is 100 percent correct, because I'm not sure what D_ID and E_ID mean.
SELECT D_ID
, E_ID
, Salary
, LAG(Salary, 1) OVER...
July 19, 2019 at 2:24 pm
Can you get the data before it's pivoted, so there are dates in there instead of quarters? Normally in a tabular model, your fact table will have a date or...
July 19, 2019 at 2:13 pm
There's a new cardinality estimator in SQL 2016. Force your query to use the old one. See: https://stackoverflow.com/questions/47215135/facing-performance-issues-in-sql-server-2016-after-migration
July 11, 2019 at 1:24 pm
Sounds like a job for CROSS APPLY.
SELECT e.EquipmentName
, lw.WarrDescription
, lw.StartDate
, lw.EndDate
FROM Equipment e
CROSS APPLY (SELECT TOP 1 StartDate, EndDate, WarrDescription
FROM Warranty...
July 9, 2019 at 4:32 pm
Multiple UNIONs? That's a recipe for a long long wait. Can you post the query?
You can try using UNION ALL between the individual queries instead of UNION. UNION will remove...
July 3, 2019 at 2:23 pm
got CREATE TABLE and INSERT scripts?
That post is nonsensical without them
July 2, 2019 at 6:11 pm
I did the Prerequisite/Co-requisite course thing a long time ago, and asked about it there. So if you look for it, Jeff Moden and someone else answered and came up...
June 29, 2019 at 7:49 pm
I formatted it.. I got lost in the CTE stuff because I wasn't following all the logic. I would definitely comment the chunks just to make it easier for other...
June 29, 2019 at 7:32 pm
In the absence of better code, this is what I came up with. I'm assuming you have a table of holidays like #Holidays table. Then you just check for the...
June 28, 2019 at 3:17 am
Shouldn't your WHERE clause be like this?
WHERE SoftwareTitle NOT IN ( SELECT <fieldname> FROM #TempTable)
You can't match a single column (SoftwareTitle) to all the columns (*) in #TempTable
June 16, 2019 at 12:59 am
Something like this?
SELECT *
FROM CustInfo ci
WHERE DateCreated IN ( SELECT DateCreated
FROM CustInfo
WHERE EntryType = 'Expired')
AND ci.EntryType != 'Expired';
(Sorry, I renamed your table to CustInfo).
June 12, 2019 at 6:45 pm
Without CREATE TABLE and INSERT scripts (sample data), there's no way to answer your question.
What does "didn't work" mean?
June 11, 2019 at 5:59 pm
Viewing 15 posts - 946 through 960 (of 3,505 total)