troubleshooting Question

SQL Help

Avatar of Jeff S
Jeff SFlag for United States of America asked on
Microsoft SQL Server 2005Microsoft SQL Server 2008SQL
3 Comments1 Solution269 ViewsLast Modified:
I would like to expand my exlusion list to also filter out notes that start with these:

Changed Collections Status to
Changed Next Contact Date to

The note starts with this ... how would I accomplish this?
CASE CAST(dbo.PatientCorrespondence.Description AS VARCHAR(8000))
        		  WHEN '**long**' THEN CAST(dbo.PatientCorrespondence.DescriptionLong AS VARCHAR(8000))
        		  ELSE CAST(dbo.PatientCorrespondence.Description AS VARCHAR(8000))
        		END AS Notes
        		PatientVisit pv1 
		LEFT JOIN PatientCorrespondence ON pv1.PatientVisitId = PatientCorrespondence.PatientVisitId 
			AND PatientCorrespondence.Description <> 'Visit Transferred to Collection' AND PatientCorrespondence.Description <> 'Visit Removed from Collection'  
		pv1.PatientVisitId = PatientVisit.PatientVisitId
		PatientCorrespondence.Created DESC
Database Consultant
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros