Subject RE: [IBO] Trouble with Count(*)
Author Eric Tishler
Lucas,

You are the man! Thanks so much for showing this to me. I have spent many years writing client/server apps (mostly in straight C in Unix from the older days), with very little time or attention to RDMS. Hence, my neophyte status when it comes to SQL.

Your input really helps me understand what can really be accomplished through SQL. The code you saw was my old school brute force approach to getting the data I needed the hard way.

Yes, I did not include all statements in my example, there was a TIB_Connection component that was already connected to the database and my query was attached to this connection.

Everything you showed me in these SQL statements makes perfect sense, but probably would not have occurred to me on my own. I wish I could get a full week of training focused on nothing but this kind of thing.

Your tips are greatly appreciated!

Eric

Eric Tishler
Software Architect
Resolute Partners, LLC
Phone: 203.271.1122
Fax: 203.271.1460
etishler@...

-----Original Message-----
From: Lucas Franzen [mailto:luc@...]
Sent: Thursday, April 15, 2004 7:00 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Trouble with Count(*)

Eric,

even easier:

SELECT SiteID, Count (*) as NumStations
from StationInfo
GROUP BY SiteID

since you don't seem to need any further fields from SiteInfo.

Luc.




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !





Yahoo! Groups Sponsor


ADVERTISEMENT
<http://rd.yahoo.com/SIG=12c0t4ign/M=293217.4826162.5971587.1261774/D=egroupweb/S=1705007183:HM/EXP=1082156467/A=2092095/R=0/SIG=127ocbvms/*http://www.thenetpanel.com?campaign=24FE1EAB04494AC3B21092C99680998Ca> click here

<http://us.adserver.yahoo.com/l?M=293217.4826162.5971587.1261774/D=egroupweb/S=:HM/A=2092095/rand=614840030>

_____

Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/

* To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com <mailto:IBObjects-unsubscribe@yahoogroups.com?subject=Unsubscribe>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of <http://docs.yahoo.com/info/terms/> Service.


[Non-text portions of this message have been removed]