Petre Agenbag wrote:
How can one select unique rows based on a set of fields
select distinct state_ID from financial_master where category_id='1'
only returns rows based on the uniqueness of one field.
what if there is another field that COMBINED with state_ID forms a
unique row; how can one sear
Sorry for "hijacking" this question, but while we are on this topic:
How can one select unique rows based on a set of fields
select distinct state_ID from financial_master where category_id='1'
only returns rows based on the uniqueness of one field.
what if there is another field that COMBINED w
At 2:07 PM -0400 9/12/03, Dan Greene wrote:
SELECT state_ID FROM financial_master WHERE category_ID = '1'
becomes
SELECT unique state_ID FROM financial_master WHERE category_ID = '1'
-or-
SELECT distinct state_ID FROM financial_master WHERE category_ID = '1'
DISTINCT will work, but UNIQUE will not.
At 01:02 PM 9/12/2003, Comcast wrote:
I am sure this is a slam-dunk, but I am new to this and stumped ... thanks.
I have the following statement, but I need it to pull only unique listings
- I get repeated items.
SELECT state_ID FROM financial_master WHERE category_ID = '1'
SELECT DISTINCT state
-->-Original Message-
-->From: Comcast [mailto:[EMAIL PROTECTED]
-->Sent: Friday, September 12, 2003 11:03 AM
-->To: [EMAIL PROTECTED]
-->Subject: SELECT only unique records
-->
-->I am sure this is a slam-dunk, but I am new to this and stumped ...
-->thanks.
-->I have the following stat
Try
SELECT DISTINCT state_ID FROM financial_master WHERE category_ID = '1'
Roger
> -Original Message-
> From: Comcast [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 12, 2003 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: SELECT only unique records
>
>
> I am sure this is a slam-dunk,
SELECT DISTINCT(state_ID) FROM financial_master WHERE category_ID = '1';
OR
SELECT state_ID FROM financial_master WHERE category_ID = '1' GROUP BY
state_ID;
-Original Message-
From: Comcast [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 2:03 PM
To: [EMAIL PROTECTED]
Subject:
SELECT state_ID FROM financial_master WHERE category_ID = '1'
becomes
SELECT unique state_ID FROM financial_master WHERE category_ID = '1'
-or-
SELECT distinct state_ID FROM financial_master WHERE category_ID = '1'
2 points !
> -Original Message-
> From: Comcast [mailto:[EMAIL PROTECTED]