SELECT cq.QuoteCreator, case when cq.QuoteCreator in (select UserAccount.FullName from UserAccount where UserAccount.FullName = cq.QuoteCreator) then 'T' else 'F' end as QuoteCreatedByFullUser, cq.QuoteLastModifiedUser FROM CustomerQuote cq INNER JOIN Entity a ON (cq.AgentId=a.PartyId) LEFT OUTER JOIN CustomerAccount c ON (cq.QuoteNumber = c.QuoteNumber) LEFT OUTER JOIN Entity s ON (cq.QuoteOwnerId=s.PartyId) LEFT JOIN Entity sp ON s.[SalespersonId] = sp.[PartyId] WHERE cq.QuoteCreateDate between '10/25/2001' AND '10/25/2017' And (cq.QuoteTypeId = '1' Or cq.QuoteTypeId = '3') AND CASE WHEN cq.QuoteLastModifiedUser IS NOT NULL THEN cq.QuoteLastModifiedUser IN (select UserAccount.FullName from UserAccount where UserAccount.FullName = cq.QuoteLastModifiedUser) END order by cq.QuoteNumber
Gain unlimited access to on-demand training courses with an Experts Exchange subscription.Get Access
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.