摘要: 自动生成编码:1 select 'SSZ'+(RIGHT(10000000001 + ISNULL(RIGHT(MAX(MaterialCode),4),0),4)) as A from H6_MaterialFab where MaterialCode like 'SSZ%'自动生成日期:SELECT 'CFR'+DATENAME(YY, getdate()) + DATENAME(MM, GETDATE()) + (RIGHT(10000000001 + ISNULL(RIGHT(MAX(BillCode),3),0),3)) as A FR 阅读全文
posted @ 2011-11-14 17:27 宋佳莉 阅读(3012) 评论(0) 推荐(0) 编辑