码迷,mamicode.com
首页 > 其他好文 > 详细

库存处理单价异常查询

时间:2018-07-20 12:29:10      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:str   and   pre   异常   string   order by   ring   declare   select   

DECLARE @ID char(20) = ‘3050131019101‘ select SUBSTRING(TD012,1,8) as 采购日期 ,TD004 as 品号 ,TD005 as 品名 ,TD008 as 数量 ,TD010 as 单价 ,TD014 as 备注 from PURTD where TD004 = @ID and TD018 = ‘Y‘ ORDER BY SUBSTRING(TD012,1,8) DESC select substring(TM002,1,8) as 核价日期 ,TM004 as 品号 ,TM005 as 品名 ,TM010 as 单价 ,TM012 as 备注 from PURTM where TM004 = @ID and TM011 = ‘Y‘ ORDER BY substring(TM002,1,8) DESC

库存处理单价异常查询

标签:str   and   pre   异常   string   order by   ring   declare   select   

原文地址:http://blog.51cto.com/gongxi/2147557

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!