I have inherited 2 stored procedures from an Access database:
=====SP1
SELECT [ID]
FROM SP2
WHERE (GC=reqGC) And (UC=reqUC);
=====SP2
SELECT [ID], Count([GroupID]) AS GC, Count([UserID]) AS UC
FROM TABLE1
GROUP BY [ID];
Note that SP1 calls SP2.
I am struggling to translate this logic into an SQL Server stored procedure.
Can anyone help me?
=====SP1
SELECT [ID]
FROM SP2
WHERE (GC=reqGC) And (UC=reqUC);
=====SP2
SELECT [ID], Count([GroupID]) AS GC, Count([UserID]) AS UC
FROM TABLE1
GROUP BY [ID];
Note that SP1 calls SP2.
I am struggling to translate this logic into an SQL Server stored procedure.
Can anyone help me?