Created
September 7, 2011 19:06
-
-
Save cwoodcox/1201418 to your computer and use it in GitHub Desktop.
This file contains 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
SELECT | |
T.DateOpenedUTC | |
,C.DataContent | |
,T.subject | |
FROM st_Tickets T | |
LEFT JOIN st_CustomDataFieldsInTickets C | |
ON (T.TicketID = C.TicketID) | |
LEFT JOIN ( | |
SELECT <fourth column here>, Tin.TicketID | |
FROM st_Tickets Tin | |
) | |
ON (T.TicketID = Tin.TicketID) | |
WHERE C.CustomFieldID='4' AND WHERE C.CustomFieldID='7' AND C.DataContent !='<Select a Product>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment