Cristina
Cristina

Reputation: 159

Repeated results from an access query

I am new to Access and acually to db's ,

I'm trying to perform a db for recording the results of a really huge survey. So far everything is ok but now that i am designing the Queries I am getting repeated results and I don't know why.

My SQL Statement is:

SELECT T_VALORACIO.IdValoracio, T_ENQUESTA.Treballador, 
T_VALORACIO.IdValPreu
FROM (T_ALSECA INNER JOIN T_VALORACIO ON T_ALSECA.idTipus = 
T_VALORACIO.idTipus) INNER JOIN T_ENQUESTA ON T_ALSECA.IdAlseca =  
T_ENQUESTA.idAlSeca
WHERE (((T_ENQUESTA.Treballador)=True) AND ((T_VALORACIO.IdValPreu)=4));

I would expect getting the results that fit both cases, but the results that fit just the first case are also shown.

Thanks in advance !

Upvotes: 0

Views: 53

Answers (1)

Sergio
Sergio

Reputation: 503

Try using instead:

SELECT DISTINCT

This removes duplicate rows.

Upvotes: 1

Related Questions