Only want one of the records in a query. [message #370896] |
Fri, 03 March 2000 01:41 |
kat
Messages: 15 Registered: February 2000
|
Junior Member |
|
|
Hi,
let me start with an example, I will write
"select address from tblCustomer where lastname='White'"
This can result in a query with more than one record.
But I only want one of them, doesnt matter which customer's address, as long as the last name of the customer is "White". Is it possible at all? Any idea? Thanks in advance.
|
|
|
|
Re: Only want one of the records in a query. [message #370910 is a reply to message #370896] |
Mon, 06 March 2000 01:15 |
Atavur Rahaman S.A
Messages: 23 Registered: January 2000
|
Junior Member |
|
|
Hope this will help you in all the way...
SQL> Select C.Customer_No, C.Customer_Name, C.Customer_Addr from Customer C where C.Customer_No NOT IN (Select DISTINCT B.Customer_No from Customer B where B.Customer_Address
Query to display the unique records with one address...
SQL> Select C.Customer_No, C.Customer_Name, C.Customer_Addr from Customer C where C.Customer_No NOT IN (Select DISTINCT B.Customer_No from Customer B where B.Customer_Address
Regards
Atavur
|
|
|
|