ÎÒµÄÊý¾Ý¿âµÄ±íÊǶ¯Ì¬µÄ±í,ÔÚÌí¼ÓÊý¾ÝµÄʱºòÓÐÒ»¸ö×Ö¶ÎÊÇDATETIMEÊý¾ÝÀàÐ͵Ä,ÏÂÃæÊÇ´æ´¢¹ý³Ì
if exists (select * from sysobjects where name='proc_ADD_Order')
drop proc proc_ADD_Order
go
create procedure proc_ADD_Order
@memberID nvarchar(20),
@futuresClass nvarchar(4),
@orderWay nvarchar(10),
@orderSet char(1),
@orderCount int,
@orderPrice nvarchar(20),
@orderTime datetime,
@result char(1),
@penName nvarchar(40),
@txOrderClass nvarchar(10),
@contestID nvarchar(40),
@yyMM nvarchar(4)
as
declare @tablename nvarchar(15),@guid nvarchar(40) set @tablename = 'TxOrder'+@yyMM set @guid=newid()
exec(
'insert into '+@tablename+' ( [guid],[memberid],[futuresclass],[orderway],[orderset],[ordercount],[orderprice],[ordertime],[result],[penname],[txorderclass],[contestid]) values ( '''+@guid+''','''+@memberID+''','''+@futuresClass+''','''+@orderWay+''','''+@orderSet+''','+@orderCount+','+@orderPrice+'+0.00,'+@orderTime+','''+@result+''','''+@penName+''','''+@txOrderClass+''','''+@contestID+''' )'
)
go
ÏÂÃæÊÇÎҵIJâÊÔÊý¾Ý:
DECLARE @return_value int
EX
create table [¿Í»§ÁªÏµ±í]([¿Í»§±àºÅ] varchar(2),[ÁªÏµÈÕÆÚ] datetime,[ÁªÏµÄÚÈÝ] int)
insert [¿Í»§ÁªÏµ±í]
select 'aa','2009/01/01',111 union all
select 'bb','2009/02 ......
¾ÍÊÇÕ¹¿ªreplication ÓÒ¼üµ¥»÷ local Subscription ´´½¨·¢²¼£¬ ÓÐÈËÓùýÂ𣬳ɹ¦´´½¨·¢²¼µÄÓÐÂð£¿
Óùý£¬¿ÉÒԳɹ¦
ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦
Ã×ÓùýµÄ°ï¶¥
ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦
µÚÒ»²½ÎҾ͹ý² ......