× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mike,

What about:

WITH tmp AS(SELECT order, MIN(repairdate) AS open, MAX(repairdate) as done
FROM fileb GROUP BY order)

SELECT a.order. b.open, b.done FROM filea a, tmp b WHERE a.order = b.order
AND open > 0 AND done > 0
UNION
SELECT a.order. b.open, b.done FROM filea a, tmp b WHERE a.order =
b.order AND open = 0 AND done > 0
UNION
SELECT a.order. b.open, b.done FROM filea a, tmp b WHERE a.order = b.order
AND open = 0 AND done = 0

You can also see how long it took for the repairs when open and done have
different dates.

Regards,
Carel Teijgeler

*********** REPLY SEPARATOR ***********

On 23-2-2012 at 16:58 Smith, Mike wrote:

I have 2 files.

FILEA and FILEB

Scenario. I am trying to create a view over 2 files that show me OPEN,
REPAIRED or ALL.
Open is where a order in FILEB has at least 1 record that has no repair
date.
Repaired is when a order in FILEB has ALL records with a Repair date.
The ALL part I got :)

Both have order number.
FILEA(ORDER)
FILEB (ORDER, REPAIRDATE)
FILEB can have multiple records per Order number

I've been struggling with this all morning.

Thanks for any help

Mike
NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this
message in error, or are not the named recipient(s), please immediately
notify the sender and delete this message.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



-----
Geen virus gevonden in dit bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 10.0.1382 / Virusdatabase: 2113/4823 - datum van uitgifte:
02/21/12




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.