January 5, 2009 at 5:47 am
I am create a new report .
How to take off code "AS1003" and them take off John from list and keep Peter on my list.
1st appointment assessement Name: John Code: AS1001
2nd appointment reveiew Name: John Code: AS1002
3rd appointment treatment Name: John Code: AS1003
1st appointment assessement Name: Peter Code: AS1001
2nd appointment reveiew Name: Peter Code: AS1002
Lakh
January 5, 2009 at 5:51 am
What did you try and what is wrong with those results?
January 5, 2009 at 6:36 am
I have try to used "not like" it only void the 3rd line but i need to void everything for John.
lakh
January 5, 2009 at 7:53 am
Please post the actual code, it's eaiser for us to help that way.
January 5, 2009 at 8:45 am
namePHC_ID Contact DateReferral Dateactivity__2
John22/15729 14-Mar-0602-Feb-06SS70
John22/15729 24-Jul-0602-Feb-06SS78
John22/15729 21-Aug-0602-Feb-06AS0630
John22/15729 25-Aug-0602-Feb-06SS71
John22/15729 01-Sep-0602-Feb-06SS76
John22/15729 21-Nov-0602-Feb-06SS74
Peter23/13278 18-Nov-0824-May-07SS90
Peter23/13278 07-Jun-0724-May-07SS76
Peter23/13278 28-Jun-0724-May-07SS76
Peter23/13278 02-Aug-0724-May-07SS76
Peter23/13278 22-Apr-0824-May-07SS78
Peter23/13278 06-May-0824-May-07SS78
Peter23/13278 15-Oct-0824-May-07SS78
Peter23/13278 01-Dec-0824-May-07D41
I need to take off code: AS0630 for John and only keep Peter record on my list.
January 5, 2009 at 8:58 am
Thanks, but I meant the query you are using ;).
January 5, 2009 at 9:18 am
SELECT dbo_pod_surgery.name, dbo_pod_surgery.PHC_ID, dbo_pod_surgery.[Contact Date], dbo_pod_surgery.[Referral Date], dbo_pod_surgery.activity__2,
FROM dbo_pod_surgery
WHERE (((dbo_pod_surgery.PHC_ID)="22/15729" Or (dbo_pod_surgery.PHC_ID)="23/13278"));
Thanks
Lakh
January 6, 2009 at 3:44 am
SELECT dbo_pod_surgery.name, dbo_pod_surgery.PHC_ID, dbo_pod_surgery.[Contact Date], dbo_pod_surgery.[Referral Date], dbo_pod_surgery.activity__2
FROM dbo_pod_surgery
WHERE (((dbo_pod_surgery.PHC_ID)="22/15729" Or (dbo_pod_surgery.PHC_ID)="23/13278")
AND dbo_pod_surgery.PHC_ID NOT IN (Select dbo_pod_surgery.PHC_ID FROM dbo_pod_surgery
WHERE dbo_pod_surgery.activity__2 = "AS0630")
);
January 6, 2009 at 3:48 am
Many Thanks
Lakh
January 6, 2009 at 3:58 am
SELECT s.name, s.PHC_ID, s.[Contact Date], s.[Referral Date], s.activity__2
FROM dbo_pod_surgery s
WHERE s.PHC_ID IN ('22/15729', '23/13278')
AND s.activity__2 <> 'AS0630'
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply