Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi The problem that I am facing ar

Status
Not open for further replies.

Lagoon1

IS-IT--Management
Dec 27, 2003
46
AU
Hi
The problem that I am facing are listed as follows:-

Sql.=
Select distinct a,b,c,d
from ......
where.........

Distinct applies to all the fields that I've selected.
Can I omit "d" from being distinct?

The above is the sql property from Microsoft Query and by selecting unique records from the edit list, it inserts the distinct function into the sql property.

Is it possible to manually override the command?

Please let me know if you have any queries.

Thanks.

Kind Regards,

Lagoon1.
 
An easy way is to generate two queries, one w/ the distinct clause (for Fields a, b, and c) and anopther w/o the distinct clause (for Field d) an both having the same where clause and field list. Then a third (Union) query should have the results set which I think you are attempting to describe.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top