Viewing 15 posts - 1 through 15 (of 27 total)
SELECT
A.Context
, A.CName
, A.OutsideId
, DATEADD(hour,-5,A.CompletedOn) AS PostedDate
FROM Audit A
INNERJOIN
(WITH PostedHistory AS
(
SELECT
a.DealId
, MAX(a.CompletedOn) as LastDate
, DATEADD(DAY, -3, MAX(a.CompletedOn) OVER()) AS CutoffDate
FROMAudit a
WHERE a.DisplayName = 'TestFloor'
AND a.Status...
October 2, 2019 at 7:48 pm
Thanks for that, guys! That does work for getting the results I need from that part of my query. I'm joining these results into a larger data set via an...
October 2, 2019 at 7:08 pm
Nice! Some of that is a bit over my head, but it does work! I'm going to have to really dig in to that solution to better understand it! Thanks,...
April 19, 2019 at 8:11 pm
Ah, yes... that did it. Sorry, I should have caught that! Many thanks for the assistance!
April 19, 2019 at 7:41 pm
Thanks for this! I'm not sure what I'm doing wrong, but it's not liking the dates as columns. They're all producing errors as such:
Msg 207, Level 16, State 1, Line...
April 19, 2019 at 6:38 pm
My apologies, I think I misstated what results I was looking for. I just want GUIDs that DON'T have a FieldName = 'Reason.Reason'
April 17, 2017 at 7:59 pm
That's exactly right. THose are the 2 ID's I want to return. But when I change to != from = I get 0 results again. My apologies, I think I...
April 17, 2017 at 7:57 pm
That's exactly right. THose are the 2 ID's I want to return. But when I change to != from = I get 0 results again.
April 17, 2017 at 7:43 pm
Well, that brings back the 3 rows that have reason.reason. i want/need to return the ones that don't have FieldName = 'Reason.Reason'.
April 17, 2017 at 7:34 pm
Tried that with my sample data, but get 0 results:
April 17, 2017 at 6:58 pm
Here's a sample data set... my result set would be the following GUIDs that don't have at least 1 instance of 'reason.reason':
5B82C628-2FA5-4A97-A665-001476DCBB9E
E1CF3C1C-7DDA-4006-820C-001748BEC17F
7BCD51C2-4494-401A-82BD-002A18AB3B07
O9DE7318-5739-4617-84DB-00A106DE3E3E
The other...
April 17, 2017 at 5:00 pm
Thank, Guys. I'll give both a shot. Side note: I'm using a single cust_id to validate my data... would both of these solutions work with multiple cust_id's?
April 4, 2017 at 3:30 pm
Lynn,
Understand about the protocol. Thanks for the clarification! I'll be sure to adhere to the process in the future if needed.
The sql you provided was exactly what I...
November 24, 2015 at 7:38 pm
Looking for a new column with the difference between most recent and it's predecessor. A dataset such as this:
CustomerID, CustomerName, AuditNum, AuditDate, DateDiff
11111, Cust1, 1, 2015-10-01, 0
11112, Cust2, 1,...
November 24, 2015 at 9:27 am
Many thanks, guys! Both seemed to work for what I needed!
October 7, 2015 at 9:32 am
Viewing 15 posts - 1 through 15 (of 27 total)