Viewing 15 posts - 661 through 675 (of 3,482 total)
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
CREATE TABLE and INSERT scripts, so people can run your query against something.... Otherwise, you won't get a tested answer. You like answers that are actually tested, right?
July 11, 2020 at 2:30 am
Oh, I definitely wouldn't do that! It would be more like "Notes from the road: what I learned (and maybe didn't) using BigQuery"
July 10, 2020 at 9:04 pm
Be warned, I'm a rank beginner... I'm absolutely clueless about BigQuery, but that might be a good thing. I guess I might have to just make an account for BigQuery...
July 10, 2020 at 7:48 pm
Get well soon, Ken!
Who else will put up with my "How does this thing work again??!!!" questions?
July 10, 2020 at 7:13 pm
Thanks, Steve, I'll check it out. (Gotta say, I never expected to have to help my nephew figure his way through BigQuery, but here I am!)
This book looks promising, but...
July 10, 2020 at 7:05 pm
The OUTER APPLY lets you join a table to a table-valued function, which you can't do with LEFT JOIN (that just joins tables/views). The APPLY forces the TOP query to...
July 1, 2020 at 12:19 am
This is really odd:
LEFT JOIN View.Costs AS CO
You're using the keyword VIEW as a schema name? That feels all kinds of No. Don't use reserved words as object names in...
June 30, 2020 at 11:37 pm
Viewing 15 posts - 661 through 675 (of 3,482 total)