Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Query

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2008-06-04 : 14:34:30
[code]

TableA
-------

sqid sqlnm STPID stID
----- ------- ----- --------
16455 Fruits 13 50
16457 Apples 12 50
16488 grapes 12 50



TableB
-------


HPID Msqid Dsqid
---- ------ ------
16458 16455 16457
16489 16455 16488


Tablec
------

CID sqid SNID Bid stID
------ ----- ---- ---- ------
16498 16457 1 Smith 50
16505 16457 1 Smith 50



**I need count(SNID) tablec

I need the below output:

StId sqlnm sqlnm Count
------- ----- ----- ----
50 Fruits Apples 2

Thanks for your help in advance !![/code]

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-04 : 14:37:57
Asked and answered here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=104166



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -