我有两个表,一个是付款,另一个是CLuster.I,使用Store Proceudre连接了两个表,现在的问题是我需要获取计数
Alter Procedure [dbo].[JKLL_Get_information_clusterwise_firstlevel_JMSL]
AS
Begin
t1.Payment_ID=t2.ClusterID
SELECT *,t2.ClusterName
FROM JKLL_Payment_Upload t1, Cluster t2
where Payment_Status=1 and Reject_Status=0 and First_Level_Approval_Status=0
END
价值与联接表 现在的问题是我需要使用Clustername获取计数 例如
If(ClusterName="Usa")
select count(Payment_ID) as value =15;
我需要使用PaymentID获取计数。你可以编辑上面的代码帮我吗..