Created
August 23, 2019 21:38
-
-
Save dperussina/87b6661eb97adb169d93bd3044d75e48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @ConsigneeName varchar(100); | |
SET @ConsigneeName = (SELECT top 1 CONCAT(DLName, ' ', DLCity, ', ', DLState) FROM tagnet_AppointmentSPN_Orders | |
WHERE JobType = 'DELIVERY' AND OrderState NOT IN (10) | |
AND PartnerPrimaryOrderID = '213U67560'); | |
DECLARE @AttemptDate datetime; | |
SET @AttemptDate = (SELECT MIN(PUActualArrive) FROM tagnet_AppointmentSPN_Orders | |
WHERE JobType = 'ATTEMPT' AND OrderState NOT IN (10) | |
AND PartnerPrimaryOrderID = '213U67560'); | |
SELECT @ConsigneeName as [Consignee:], @AttemptDate [Attempted Pickup:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment