使用VM03801 SELECT sum([conVehicleQuantity]),[vehdtlName]

时间:2016-12-26 07:37:09

标签: sql-server

您好,我需要帮助

use VM03801;

SELECT sum([conVehicleQuantity]) ,[vehdtlName]
FROM [VM03801].[dbo].[tblContent] as tc 
INNER JOIN [VM03801].[dbo].[tblVehicleDetails] as tvd 
   on tc.conVehicleCode = tvd.vehdtlId 
INNER JOIN [VM03801].[dbo].[tblDoc]as td 
   on tc.conDocId = td.docId 
where td.docDocTo = 'stor ' and tvd.vehdtlName ='GMC' group by vehdtlName

我想打印上述查询的结果

0 个答案:

没有答案