/****** 查找案件信息———————注意案件信息一定需要在卷宗系统中存在 ******/
SELECT TOP 1000 *
FROM [Ldt_JudgeDoc].[dbo].[CS_Case] where CaseID = ‘3887519621942607872‘ or CaseCode=‘‘
/****** 获取存在证据材料案件 ******/
SELECT TOP 1000 *
FROM [LDT_FileManage].[dbo].[FM_Dossier_2021_1850] d,[LDT_FileManage].[dbo].FM_Dossier_AuxiliaryInfo_2021_1850 a
where d.DS_ID = a.DS_ID and a.DAI_IsEvidence=‘1‘ order by d.DS_CreateTime desc
/****** 更新CaseId ******/
update [LDT_FileManage].[dbo].[FM_Dossier_2021_1850] set cs_id = ‘3887519621942607872‘
where DS_ID in(‘b5cc45e9c7e74f4496d204aed64cf2c4‘)
update [LDT_FileManage].[dbo].FM_Dossier_AuxiliaryInfo_2021_1850 set cs_id = ‘3887519621942607872‘, DAI_IsEvidence=‘1‘
where DS_ID in(‘b5cc45e9c7e74f4496d204aed64cf2c4‘)
/****** 获取案件证据材料信息 ******/
SELECT TOP 1000 * FROM [LDT_FileManage].[dbo].[FM_Dossier_2021_1850] d,[LDT_FileManage].[dbo].FM_Dossier_AuxiliaryInfo_2021_1850 a
where d.DS_ID = a.DS_ID and d.cs_id = ‘3887519621942607872‘ and a.DAI_IsEvidence=‘1‘
原文:https://www.cnblogs.com/xiaoguozi/p/14518182.html