Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 24th, 2003, 11:28 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default finding total no. of records

I have fields "Singer","Song" in a Table "Album"

Now i want to run a combination of SQL Query & other functions combined so that i finally get hold of the total no. of songs sung by each different Singer existing in the "singer" field

i tried using RecordCount propert of Recordset but it dint work out.

how do i do this.

i posted this in the how-to section, but no-ones answering. mebe its too simple as im newbie to asp. or wrong forum

Reply With Quote
  #2 (permalink)  
Old July 24th, 2003, 01:01 PM
uit uit is offline
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Greetings -

You might be able to check the RecordCount property of your recordset.

Please note that in some cases you wont be able to grab the # of records from that property. You should review this info to help you learn more about this topic: http://www.aspfaq.com/show.asp?id=2193

Hope that helps you....

Reply With Quote
  #3 (permalink)  
Old July 24th, 2003, 02:05 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx for getting me on with the recordcount. But i still havnt solved my problem.

The idea is to look for how many entries each singer has got without supplying the singers name, that is first i've to find out what allare the names of singers in the database and then find of no. records of each singer.

How do i do that ? I need some more help regarding that.

Reply With Quote
  #4 (permalink)  
Old July 24th, 2003, 02:22 PM
uit uit is offline
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I see what you are saying now, sorry about the confusion...

You are most likely looking for a count per singer of the number of songs for each.

Try this:

SELECT SINGER, COUNT(*) FROM ALBUM GROUP BY SINGER

For more info on "GROUPING" - check out www.sqlteam.com - they have a pretty decent site. The Wrox books are very good too.

Reply With Quote
  #5 (permalink)  
Old July 24th, 2003, 06:35 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx that has solved my problem now

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in updating records & finding records naveed77 VB Databases Basics 1 January 16th, 2007 12:12 PM
problem in updating records & finding records naveed77 VB How-To 1 January 16th, 2007 12:10 PM
Get total records europhreak Classic ASP Basics 10 February 5th, 2006 02:12 PM
how to find total no. of records reshmisworld Classic ASP Basics 1 July 24th, 2003 08:04 PM
finding total no. of records reshmisworld Classic ASP Databases 1 July 24th, 2003 03:23 PM



All times are GMT -4. The time now is 08:21 PM.


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