Please help with this querie

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!
I have a queri, in this queri there can bee the same number 2 times
if the number are in the queri 2 times then i don't want to see the number
at all
how can i do that?

Regards
alvin
 
Change your select statement from

Select FieldName From TableName

To
Select Distinct FieldName FromTableName

Note: it will make it into one record only if all the fields in the query
between the two records are equal, not only the field that holds the 2.
 
Hallo ofer
thanks
but can't use this, because if the number are 2 times in my query i don't
want to have the number at all, i know about distinct but then i get the
number one time and i dont want the number at all like if i get 20 numbers in
my query and if one off this numbers come 2 times then i don't want to see
it, but just get the 18 numbers.

regards

alvin


"Ofer Cohen" skrev:
 
Mybe something like

SELECT TableName.FieldName
FROM TableName
WHERE TableName.FieldNameIn (SELECT TableName.FieldName
FROM TableName
GROUP BY TableName.FieldName
HAVING Count(TableName.FieldName)=1)
 
In case you have trouble with this, you can build the query with the Find
Duplicates query wizard to find records where your number field is
duplicated. Once the query is built, you can modify the criteria it
creates.

You just change "Having Count(SomeFieldName) > 1" to "Having Count
(SomeFieldName) =1"
 
Back
Top