Need Help 2
I am currently converting an access DB to MS SQL.
I am currently trying to figure out how to code this
I need the count of all rows in colum TERM that is > 1 when its grouped by the COLUM NAME
Anyone got any Ideas,I do not know the specifics of MS SQL, however a general approach to your problem might be
select column, count(*)
from table
where term > 1
group by student;
Showing posts with label thisi. Show all posts
Showing posts with label thisi. Show all posts
Wednesday, March 28, 2012
Need Help 2
I am currently converting an access DB to MS SQL.
I am currently trying to figure out how to code this
I need the count of all rows in colum TERM that is > 1 when its grouped by the COLUM NAME
Anyone got any Ideas,i'm not sure wheter i get it right.
hope that it was the thing that you ask for.
Select TERM,Count(<table key>) as Cnt from <Table \name>
Wher TERM > 1
Group by TERM.
If I didn't get it right then just forget about it.
:D|||select count(*) from tbl
where term in
(
select term from tbl group by name having count(*) > 1
)
I am currently trying to figure out how to code this
I need the count of all rows in colum TERM that is > 1 when its grouped by the COLUM NAME
Anyone got any Ideas,i'm not sure wheter i get it right.
hope that it was the thing that you ask for.
Select TERM,Count(<table key>) as Cnt from <Table \name>
Wher TERM > 1
Group by TERM.
If I didn't get it right then just forget about it.
:D|||select count(*) from tbl
where term in
(
select term from tbl group by name having count(*) > 1
)
Subscribe to:
Posts (Atom)