最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
生成按日期编码的编码格式 SQL语句
时间:2011-03-02 编辑:简简单单 来源:一聚教程网
生成按日期编码的编码格式 sql语句
sqlparameter[] parameters = {
new sqlparameter("@dateday", sqldbtype.nvarchar,10)
};
parameters[0].value = system.datetime.now.tostring("yymmdd");
string strsql = @"declare @id nvarchar(20)
select @id=isnull(max(cast(right(id,5) as int)),0)+1
from chicrwh.storehouse.inwarehouse with(nolock)
where charindex(@dateday, id)=2
set @id='b'+@dateday+right('0000'+@id,5) select @id";
-
下一个: 删除重复数据sql语句
相关文章
- MySQL登录、访问及退出操作解析 10-18
- sql语句 update字段null不能用is null问题解析 09-28
- SQL Server ISNULL 不生效原因及解决分析 09-28
- 关于if exists的用法及说明分析 09-28
- Access数据库日常维护方法 09-28
- Oracle 删除大量表记录操作介绍 09-27