ぷ行走de猫げ

在快乐中成长,在快乐中学习!

摘要: Create FUNCTION [dbo].[get_SerialNo]()RETURNS VARCHAR(20) AS BEGIN declare@x1 int, @y1 char(8),@z1 varchar(30) select @x1= COUNT(SaleID) from SalesActivity where CAST(CreateDt as date)=CAST(GETDATE() as date) if(@x1=0) begin select @y1=convert(char(8),getdate(),112) select @z1= 'CX'+@y1+' 阅读全文
posted @ 2012-04-28 11:22 李天翔 阅读(227) 评论(0) 推荐(0) 编辑