摘要:
自动生成编码: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 阅读全文