SELECT Id, TypeName, ParentId, DepartId, CusId, ImageUrl, Ext1, Ext2, Ext3,(SELECT COUNT(*)FROM dbo.VPartInfo WHERE( case when a.ParentId = '0' then VPartInfo.BigType else VPartInfo.SmallType END) = a.Id AND CusId='201607291017326856-99fb-p6zx68' AND[dbo].[VPartInfo].[DepartRelationId] LIKE '%201608031119253248-959b-4vzj4v%' )AS Number FROM dbo.Parts_PartsType AS a where CusId='201607291017326856-99fb-p6zx68' AND ParentId='0'
case when then 语句
最新推荐文章于 2022-05-11 12:57:43 发布