Viewing 15 posts - 661 through 675 (of 3,489 total)
That many points and no consumable data?
SvcAcct is used on different ServerNames
SELECT ServiceAccount
FROM Accounts a INNER JOIN Servers s ON a.ServerID = s.ServerID
GROUP BY ServiceAccount
HAVING COUNT(*)>1
July 22, 2020 at 2:37 pm
Oh, so it's not an "out of the box" thing. I was watching one of Brent Ozar's videos on SSMS, and I thought it was. Thanks! Might have to splurge...
That's...
July 22, 2020 at 2:22 pm
I believe that the editor window colors are a windows user specific setting, not a SQL session specific setting.
=(
Drat. So at least I might not be as dumb as I...
July 21, 2020 at 10:33 pm
DECLARE @p_start_date DATETIME = CAST('2017-12-01 00:00:00' AS DATETIME);
DECLARE @p_end_date DATETIME = CAST('2017-12-31 00:00:00' AS DATETIME);
SELECT
DATEDIFF( HOUR
, @p_start_date
, @p_end_date
); July 21, 2020 at 6:11 pm
Like this maybe?
DELETE
FROM #tblTest1
WHERE ID IN (
SELECT ID
FROM #tblTest1 t1
CROSS APPLY STRING_SPLIT(t1.SName, '/') ss
WHERE ss.value IN (SELECT SName FROM #tblTest2)
);
July 20, 2020 at 8:51 pm
Did you try running SSMS as admin, too?
July 19, 2020 at 8:23 pm
One way is to use a Calendar table, and to include Fiscal Month and Fiscal Quarter, and join to that. And then do the pivot
July 17, 2020 at 4:32 am
Without a Contacts table, you can't do it.
You'd get all the contacts who had been contacted in the last 18 months, and then exclude those ContactIDs from those in the...
July 15, 2020 at 9:00 pm
STRING_AGG()?
USE AdventureWorks2017;
GO
SELECT OrganizationLevel
, STRING_AGG(CONVERT(nvarchar(max), JobTitle), CHAR(13)) AS csv
FROM HumanResources.Employee
GROUP BY OrganizationLevel;
July 15, 2020 at 3:11 pm
Is there any way to replace all those NOT IN ( ) clauses? Basically, you're forcing a table scan on all of those columns you're using that on.
July 15, 2020 at 1:03 am
How would you get driving distance? use a web API or a .NET library to get the directions from Point A to Point B? (Is this a Solomon Rutzky question?)
July 14, 2020 at 1:31 am
Why not just a table of (BuildingFromID, BuildingToID, Distance) ? you'd have to create a check to make sure there are no duplicates in (From,To) and (To,From).
July 13, 2020 at 8:00 pm
DECLARE @v VARCHAR(100)='O:\Z\P_Metrics\Inbox\07-13-20200702_abc_enroll.csv';
DECLARE @V1 VARCHAR(100)='O:\Z\P_Metrics\Inbox\07-14-20200702_abc_complete_enroll.csv';
Solution:
SELECT LEFT(@V1,LEN(@V1) - CHARINDEX('\',REVERSE(@V1),1))Returns:
O:\Z\P_Metrics\Inbox
O:\Z\P_Metrics\Inbox
July 13, 2020 at 6:42 pm
Off the top of my head, you'd use a cross join so you'd get two copies of Building, and then if your buildings are really close together, you could just...
July 12, 2020 at 1:25 pm
Okay, just found one really interesting feature... described here: https://cloud.google.com/bigquery/docs/querying-wildcard-tables#limitations
It makes sense if your data pipeline generates something like CSV files with a format of [standard file prefix]MMDDYY
the part to...
July 11, 2020 at 3:50 pm
Viewing 15 posts - 661 through 675 (of 3,489 total)