日期:2014-05-17 浏览次数:20472 次
SELECT TYPE_PAR_NO, TYPE_PAR_NAME, CAST((CASE WHEN '{0}' = '' THEN 0 ELSE (CASE WHEN TYPE_PAR_NO IN (SELECT TYPE_PAR_NO FROM FAMS.TB_SUPPLIER_INFO_DTL WHERE SUP_SN = '{0}') THEN 1 ELSE 0 END) END) AS BIT) AS CHECKED_NO FROM FAMS.TB_TYPE_PARENT_INFO
SELECT TYPE_PAR_NO, TYPE_PAR_NAME, case when t.TYPE_PAR_NO is null then 0 else 1 end AS CHECKED_NO FROM FAMS.TB_TYPE_PARENT_INFO s left TB_SUPPLIER_INFO_DTL t on s.TYPE_PAR_NO=t.TYPE_PAR_NO
------解决方案--------------------
一般都是用计算字段,ADO控件对多表关联的控制不太好
------解决方案--------------------