CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Hide duplicate value

Print topic Send  topic

Author Message
gmoore
Posted: 07/22/2003, 2:54 PM

Does anyone have any suggestions on how to hide duplicate values in a grid. I'm using CCS, MS Access and ASP.
rrodgers
Posted: 07/22/2003, 4:24 PM

use the distinct key word in your query?

rob
gmoore
Posted: 07/23/2003, 3:48 PM

What I'm actually trying to do is hide occurences of the the same value in a list to create a report type format. The example in help does not work. Does anyone have a solution.
It Farmer
Posted: 07/23/2003, 4:32 PM

This what i do, I am no much of an SQL wizard. But here we go.

In MSAccess.
Make a query on the table which has the duplicate entries. In the Query only select the field that thas the duplicate value.

Than you can select the Totals icon (is on the toolbar in the query builder). You will see that under your selected field it shows up as group, leave it like that.

Select sort to be asc or desc what ever you want (this is optional) but makes it bit nicer.

Run the query, and you will see that you only get the entries shown once.

To get this into CCS without using the query. Here is a nice one.

Select SQL view from view (sits under file) and there you have your SQL statement. Delete the return so your SQL is on one line. (does not really matter if you do not do it but if you don't CCS translate the return into a Square character :-)).

In CCS when asked for data source, select Data Source Type to SQL, copy the SQL from the MSACCESS SQL view in this box. Test it (will return that the syntax is ok) than Review the data and it should show your records.

Click ok and do what you have to do.

This is how I do it, beats the sh** out of typing it all in. I guess it just an other way of doing things :-).

Have fun
henk
Sparkey
Posted: 08/18/2003, 3:58 AM

Hi

Just a thought, i had a similiar problem and all i did was to add a date field called lastupdated to my form which was hidden and set to now(). when i selected the record i wanted in the grid i looked for that record with the most recent time & date. works fine for me. My code is similiar to this

SQL = "Select * FROM tblEmployees "
Where = "LastUpdated = (Select MAX(LastUpdated) " & _
"FROM tblEmployees tblEmployees2 " & _
"WHERE tblEmployees2.EmpID = " & _
"tblEmployees.EmpID)"

dont worry bout tblemployees2, just use to copy info, all i need to create is tblemployees

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.