February 19, 2007 at 9:30 am
I have a query:
SELECT orig.*, X.DisplayName AS Expr1, X.BirthDayNum AS Expr2,
X.BirthMonthNum AS Expr3,
X.BirthYearNum AS Expr4
FROM X INNER JOIN
Y ON X.PRIMARYKEY =
Y.Client.PRIMARYKEY INNER JOIN
(SELECT ReasonText, CreatedWhen, OrderStatusCode
FROM Y
WHERE (OrderStatusCode = 'perf')) orig INNER JOIN
(SELECT reasontext
FROM Y
WHERE orderstatuscode = 'perf'
GROUP BY reasontext
HAVING COUNT(*) > 1) dup ON orig.ReasonText =
dup.reasontext AND orig.ReasonText = dup.reasontext ON
Y.ReasonText = orig.ReasonText COLLATE
SQL_Latin1_General_CP1_CI_AS
WHERE (Y.CreatedWhen >= '20061101') AND
(Y.CreatedWhen < '20070215') AND
(Y.ReasonText LIKE 'Filler Order ID:%') OR
(Y.ReasonText LIKE 'Placer Order ID:%')
Filler Order ID: <A023403771020> Filler Facility ID: <RAD> | PERF | Good, KELLY |
Filler Order ID: <A023403771020> Filler Facility ID: <RAD> | PERF | Good, KELLY |
Filler Order ID: <1018863276856> Filler Facility ID: <RAD> | PERF | XTEST, TEST |
Filler Order ID: <1018863276856> Filler Facility ID: <RAD> | PERF | XTEST, TEST |
Filler Order ID: <A023403771020> Filler Facility ID: <RAD> | PERF | BAD, KELLY |
Filler Order ID: <A023403771020> Filler Facility ID: <RAD> | PERF | BAD, KELLY |
Filler Order ID: <1018863276856> Filler Facility ID: <RAD> | PERF | XTEST, TWO |
Filler Order ID: <1018863276856> Filler Facility ID: <RAD> | PERF | XTEST, TWO |
What I want is to identify when the filler order id is repeated for more than one person., ie Good, Kelly and Bad, Kelly
I don’t care if its repeated on the same person.
How do I do this? And thanks to SQLBILL for all previous help.
Any help would be appreciated.
February 19, 2007 at 5:05 pm
Maybe I'm just missing it... what does the output you listed have to do with the query you listed?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply