select * from v_wms_base_location lo
left join v_wms_base_zone zo on (lo.zone_id=zo.id)
left join v_wms_item_location_map ma on (ma.loc_id=lo.id)
left join v_wms_inv_detail de on (lo.id=de.loc_id)
where UPPER(lo.LOC_CODE) LIKE '%' || UPPER('s') || '%' and ma.id is null
and (de.qty=0 or de.qty is null)
这什么问题? 到ORACLE上运行没问题啊
------解决方案--------------------------------------------------------
||在sqlserver里没有此用法,请百度查询一下sqlserver与oracle的一些常用区别