Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 guys new question loooool "count"
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

quince
Junior Member

Canada
103 Posts

Posted - 10 January 2005 :  12:06:49  Show Profile
is there any way by using ASP with MS access to retrieve a specific data from a table and when i retrieve i want to show me the data without repeating the same data or duplicating data and i want instead of this to count for each item how many row is there in a the table ....... loooool i know that most of you will tell me to re-explain what i want to say again ... ?

for example i had three rows in the table ... and those rows are the same with 4 attributes ... what i need is to retrieve those rows in the website .. but instead of showing three rows it will show me one and next to this row i want to put 3 which is the number of the rows in the table that are the same and if i have any other rows it will do the same ...
if u need any more explamation tell me ...
okay guys waiting for your replies....

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 10 January 2005 :  13:57:34  Show Profile  Visit D3mon's Homepage
I think I know what you mean, I'll try some with test data to get the query...


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 10 January 2005 :  14:06:06  Show Profile  Visit D3mon's Homepage
SELECT DISTINCT col1,col2,col3,col4,COUNT(*) AS 'matchedrows'
FROM my_table
GROUP BY 'matchedrows',col1,col2,col3,col4


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 10 January 2005 :  14:11:51  Show Profile  Visit D3mon's Homepage
here's my test table

col1 |col2 |col3 |col4
1 |1 |1 |1
1 |1 |1 |1
1 |1 |1 |1
1 |1 |1 |1
2 |2 |2 |2
2 |2 |2 |2
2 |2 |2 |2
3 |3 |3 |3
3 |3 |3 |3
4 |4 |4 |4

Heres the query results:

col1 |col2 |col3 |col4 |'matchedrows'
1 |1 |1 |1 |4
2 |2 |2 |2 |3
3 |3 |3 |3 |2
4 |4 |4 |4 |1


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 10 January 2005 :  16:58:23  Show Profile
thanks D3mon for replying on my post....
i tried it and it worked....
see ya
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07