bostonkiwi
MIS
Hi,
I am new to MS SQL Server 2000 and have a really simple query I need help with.
Right now I have the following query:
SELECT *
FROM dbo.scores
WHERE (testKey LIKE 'EN_PS1%')
This of course returns all the rows in the table where the testkey is begins with EN_PS1
However, what I need is to count how many entries there in the table that match the specified 'testkey' for each of the entries in a column/field called parentkey.
For example, if there were 10 records in the parentkey column that matched EN_PS1% I would get results saying:
parentkeyxxx 10
Thanks,
Chris.
I am new to MS SQL Server 2000 and have a really simple query I need help with.
Right now I have the following query:
SELECT *
FROM dbo.scores
WHERE (testKey LIKE 'EN_PS1%')
This of course returns all the rows in the table where the testkey is begins with EN_PS1
However, what I need is to count how many entries there in the table that match the specified 'testkey' for each of the entries in a column/field called parentkey.
For example, if there were 10 records in the parentkey column that matched EN_PS1% I would get results saying:
parentkeyxxx 10
Thanks,
Chris.