Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 19th, 2005, 01:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default distinct clause in report

how can use distinct cluase in Access Report Query ?
I use distinct cluase in the query but it ask vdate,
I want that it not ask vdata just display result
with distinct vdate how?


SELECT [distinct].[dbo_pvideo].[vdate], [dbo_pvideo].[userid], [dbo_pvideo].[empno], [dbo_pvideo].[video1], [dbo_pvideo].[video2], [dbo_pvideo].[video3]
FROM dbo_pvideo
WHERE ((([dbo_pvideo].[video1]) Is Not Null))
ORDER BY [dbo_pvideo].[userid], [dbo_pvideo].[vdate] DESC;


regards.

Mateen



 
Old February 19th, 2005, 10:28 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hi Mateen,

DISTINCT is a SQL keyword that would be used like:

SELECT DISTINCT [dbo_pvideo].[vdate], [dbo_pvideo].[userid], etc., etc..

though I doubt that will get you the results you're looking for (though I'm not really clear on what results you're looking for).

It appears that what you may want to do is GROUP BY the date in the report. But again, not sure...

Bob

 
Old February 21st, 2005, 06:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks.

it is ok.

regards.

Mateen







Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Distinct Smeghead SQL Server 2005 9 December 17th, 2007 11:10 AM
Distinct Eddywardo SQL Server 2005 1 September 2nd, 2006 07:41 AM
DISTINCT trouble HockeyFan Classic ASP Databases 1 March 7th, 2006 01:07 PM
Distinct SELECT DISTINCT question... EndEffect Classic ASP Databases 4 August 18th, 2005 08:53 AM
How to simulate DISTINCT clause in SQL SERVER debsoft SQL Server 2000 6 June 30th, 2003 06:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.