select a.biaoti,a.laiyuan,b.* from sab_xwgg as a join yhgl as b on charindex(cast(b.dm as nvarchar(max))+';',a.dm)>0 where b.dm='1'
加上全部为0时的显示
select a.*,b.xm from sab_xwgg as a join yhgl as b on (charindex(cast(b.dm as nvarchar(max))+';',a.dm)>0 or a.dm='0') INNER JOIN YHGL ON a.tjrid=YHGL.dm where b.dm='1'

相关文章:

  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
猜你喜欢
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-04-16
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案