Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp ¸´ÔӵıàºÅÔö³¤ÎÊÌâ ¼±£¡

ÎÒµÄCardID×Ö¶ÎÀï±£´æÓÐHM-CQ-050202-0001£¨ÆäÖÐ050202ÊDzúÆ·±àºÅ£¬0001ÊÇÁ÷Ë®ºÅ£©£¬»¹ÓÐ
HM-CQ-050404-0001¡¢
HM-CQ-100202-0001¡¢
HM-CQ-100404-0001¡¢
HM-CQ-200202-0001¡¢
HM-CQ-200404-0001¡¢ÕâЩ±àºÅ£¬ÎÒÔÚÌí¼ÓµÄʱºò£¬ÈçºÎÅжϷֱð¸ù¾Ý´ÓÊý¾Ý¿âÀï¶Á³öÀ´µÄÁ÷Ë®ºÅ×Ô¶¯Ôö³¤ÄØ£¿ÎÒ·ÅÔÚÏÂÀ­±íÀïµÄ£¬¸ù¾ÝÏÂÀ­±íÑ¡ÔñµÄ¹æ¸ñ²»Í¬¶øÏÔʾµÄ±àºÅ²»Í¬¡£×öÁ˺þû¹ÊÇ×ö²»³öÀ´£¬Ö»ºÃÇëÉçÇø¸ßÊÖ°ï°ï棡ллÁË£¡£¡£¡
°Ñ×îºó4λ³é³öÀ´£¬²åÈëÊý¾Ý¿âµÄʱºò£¬±àºÅÔö³¤ÓɳÌÐò¿ØÖÆ¡£

ÔÚÊý¾Ý¿âÀï×ö°É ÏÈÅжÏÓÐûÓÐ ÓеĻ°È¡³öºóËÄλת»»³ÉÊý×ÖÔÙ¼Ó1

SQL code:

if object_id('tb') is not null
drop table tb
go
create table tb(code nvarchar(20))
go
insert into tb values('HM-CQ-050404-0001')
insert into tb values('HM-CQ-100404-0001')

------------------------------------------------
if object_id('getCode') is not null
drop function getCode
go
create function dbo.getCode(@strPre nvarchar(20))
returns nvarchar (20)
as
begin
declare @id int
declare @code nvarchar(20)
select @id=1
if not exists(select top 1 1 from tb where left(code,12) = @strPre )
begin
select @code= @strPre+'-'+left('000'+ltrim(@id),4)

end
else
begin
select @code=@strPre+'-'+left('000'+ltrim(cast(max(right(code,4))+1 as int)),4) from tb

end
return (@code)
end
go
---------²âÊÔ
select dbo.getCo


Ïà¹ØÎÊ´ð£º

Ç뾫ͨasp³ÌÐòµÄÅóÓѰïæÐÞ¸ÄÍøÕ¾

ÎÒÃÇÓÐÒ»¸öÍøÕ¾Ä£°å£¬www.c111.com.cn,Ï£ÍûÐÞ¸ÄһЩµØ·½£º
1£©µã»÷×ó²à¡°·þÎñÆ·ÅÆ¡±µÄÆäÖÐÒ»¸öС·ÖÀ࣬Èç¡°×ãÇò¡±£¬½çÃæµÄÓÒ²à¾Í³öÏÖÈçwww.c111.com.cn/1.jpg£¬µã»÷1.jpgÉÏ·½µÄÆäÖÐÒ»¸öÆ·ÅÆlogo£¬ÏÂÃæ¾Í³öÏÖÏà¹ØµÄÍ ......

aspÎļþ½âÃÜ

ÎÒÓÐÒ»¸öaspÔ´Â룬µ«ÊdzöÏÖÒ»¸öÎļþ£¬ÎÒÓÃasp½âÃܶ¼ÊÇÂÒÂë
Çë½Ì

VBScript code:
??

 %# , #&')*)-0-(0%()(?

(((((((((((((((((((((((((( ......

ÎÒÊÇÒ»ÃûASP´¦Ñ§Õߣ¡ÏëÇë°ïÃ¦ÍÆ¼öÒ»±¾ASPºÃµÄÊé¼®

ÎÒÔ­±¾ÊÇѧjspµÄ¿ÉÕÒÁËÒ»¸öASPµÄ¹«Ë¾£¡ÎÒÒªÖØÐÂѧϰ£¡ ѧϰASP£¡ Ï£Íû´ó¼ÒÍÆ¼öÒ»±¾ºÃÊ鏸ÎÒлл
<ASP3.0¸ß¼¶±à³Ì> ÍøÉÏÓеç×Ó°æµÄ

·¢ÏÖÍøÉÏaspÐÅϢʱ×î¶àµÄ ±ÈÆäËûµÄ¶¼¶àºÃ¶à

yun

ÕÒ±¾ÓÐÓ¦ÓÃÊÂÀýµÄA ......

aspºǫ́µÇ½ÎÊÌâ

ÎÒ°ïѧУ×öÁËÒ»¸öÕ¾£®

ÔÚÐ£Ô°ÍøµÄÇé¿öÏ£¬Äܹ»µÇ½³É¹¦£¬ºǫ́ÕʺŶ¼ÄÜͨ¹ý£¬½øÈëºǫ́

µ«ÊÇÔÚÍâÍø£Á£ÄµÄÇé¿öÏ£¬Äܹ»µÇ½ºǫ́µÄÒ³Ãæ£¬Ò³ÃæÊÇ£Á£Ó£ÐÎļþ£®
µ«ÊÇÊäÈëÕʺźÍÃÜÂëµÄʱºò£¬ÍøÒ³ÔËÐкܾö¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ