db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yun Chie <flavour12...@gmail.com>
Subject need help with distinct results
Date Fri, 27 Jun 2008 15:06:18 GMT

Hi all,

I have the following statement (very roughly):

SELECT DISTINCT Customer.Customer_UID, Sales.Sales_UID FROM Customers, Sales
...
INTERSECT 
SELECT DISTINCT Customer.Customer_UID, Sales.Sales_UID FROM Customers, Sales
...

I just need to know what's the right syntax to retrieve only the distinct
results, as,  the above statement retrieve also duplicates, in other words,
what is in derby the right syntax for the following statement:

SELECT Customer.Customer_UID, Sales.Sales_UID (
(SELECT DISTINCT Customer.Customer_UID, Sales.Sales_UID FROM Customers,
Sales ...)
INTERSECT 
(SELECT DISTINCT Customer.Customer_UID, Sales.Sales_UID FROM Customers,
Sales ...)
)

thanks for your help.
-- 
View this message in context: http://www.nabble.com/need-help-with-distinct-results-tp18157186p18157186.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message