请问版主这个写法改怎么写。。

mzwhq 2018-09-22 04:06:50
case when {#源表#.freasoncode}<>'913' then select _x_fcz t_INVD_StkInLogItem where fStkInLogNo={#源表#.fstkinlogno} and fGoodsID={#源表#._x_f006} and fSNo={#源表#.fsno}
else select _x_fxc t_INVD_StkOutLogItem where fstkoutlogno={#源表#.fstkinlogno} and fGoodsID={#源表#._x_f006} and fSNo={#源表#.fsno} end
...全文
258 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
吉普赛的歌 版主 2018-09-22
  • 打赏
  • 举报
回复
不知道你这是弄的啥, 伪码?配置文件?

瞎猜, 看能不能蒙对。
SELECT _x_fcz 
FROM t_INVD_StkInLogItem AS a INNER JOIN #源表# AS b
ON a.fStkInLogNo = b.fstkinlogno
AND a.fGoodsID = b._x_f006
AND a.fSNo = b.fsno
WHERE b.freasoncode} <> '913'
UNION ALL
SELECT _x_fcz
FROM t_INVD_StkOutLogItem AS a INNER JOIN #源表# AS b
ON a.fstkoutlogno = b.fstkinlogno
AND a.fGoodsID = b._x_f006
AND a.fSNo = b.fsno
WHERE b.freasoncode = '913'


34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧