Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need Help With Query
"Daniel A. Morgan" <damorgan_at_exesolutions.com> wrote in message news:<3C59B02B.10585CB0_at_exesolutions.com>...
> There are many ways to do this. One would be with the intersect operator
>
> SELECT stuff from today
> INTERSECT
> SELECT stuff 30 days ago
>
> Another would be with a correlated subquery using EXISTS.
>
> But no matter what I'd dump the hard coded values and use bind variables
> ... and most importantly ... get the TEST data out of your production
> database. It does not belong there and will cause endless problems.
> Especially, as a hospital, where you are subject to audit for
> accreditation.
Actually, we're NOT a hospital. I work for a company that does medical case management, and a part of that is indentifying members who have continuing problems and complications, because those people might be appropriate for case management.
As for the test data, I agree totally. Unfortunately, I'm not the DBA, so I don't have any control over that. However, I can tell you that having test data in the production database has been an issue here. That data was entered by a nurse/trainer who had no understanding of why test data in a production database is a bad thing. That kind of thing is no longer being done. The DBA says that the test data can not be removed. I'm not sure why.
--Tom Received on Fri Feb 01 2002 - 11:16:24 CST