Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Difficult query problem
"DFS" <nospam_at_dfs_.com> a écrit dans le message de news: C5nBg.15880$WM.13984_at_bignews1.bellsouth.net...
| Michel Cadot wrote:
| > "DFS" <nospam_at_dfs_.com> a écrit dans le message de news:
| > 9FTAg.46060$Nt.22378_at_bignews8.bellsouth.net...
| >> Tough one here, I think. The following data set is building
| >> inspection visits. It consists of multiple visits (2+) made to the
| >> same building on the same day.
| >>
| >> There are 3 "conditions" I want to reveal using only SQL statements.
| >>
| >> 1) visits made by the same employee, for different visit codes (eg
| >> records 1 and 2)
| >> 2) visits made by different employees, for the same visit codes (eg
| >> records 7 and 8)
| >> 3) visits made by the different employees, for different visit codes
| >> (eg records 36 and 37)
| >>
| >
| > Given the algorithm you use in your VB code I think the following
| > query will do the work.
|
|
Yes but aming these 3 visits, 2 were with visitcode 'V9' and meet condition 2 and so are eliminated according to your VB algorithm: "marking the rows that met conditions 1 or 2, then looking for ***those that met neither or both conditions 1 and 2 (and marked those as condition3)***"
Regards
Michel Cadot
Received on Sun Aug 06 2006 - 10:06:52 CDT