Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 17th, 2004, 05:04 PM
Registered User
Join Date: Mar 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to programmer_kay
Default SQL query for count

   I have two tables as table1(featureid) and table2(featureid). The difference is table1 has duplicate records of feature ids like
and table 2 has unique set of featureids

So, now I want something which counts how many entries of a particular featureid are there in table1. i.e.

featureid count
  1 2
  2 1

How can I do this.
 Any help is appreciated. Thanks!!

Reply With Quote
  #2 (permalink)  
Old April 18th, 2004, 02:48 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik

SELECT Count(Featureid)
FROM urTable
GROUP BY Featureid
Hovik Melkomian.
Reply With Quote

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
new display count query carswelljr SQL Language 9 May 7th, 2007 04:59 PM
SQL count query not giving correct results hman SQL Language 2 March 16th, 2005 07:06 AM
SQL count query not giving correct results hman SQL Server 2000 1 March 15th, 2005 01:15 PM
query count? Raif Access 1 June 18th, 2004 05:08 PM
SQL query for count programmer_kay SQL Language 1 April 17th, 2004 07:30 PM

All times are GMT -4. The time now is 10:15 AM.

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