|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
我想把用友通10.1升级到T3,直接升不上
于是我就先升到10.3,10.3恢复后升级SQL出现了问题,请问怎么解决呀
我10.3的补丁打过还是一样
--shenxy 2007-11-13 修改添加项目的COY值
declare @MaxCOY int
declare @BlueIDCOY int
set @MaxCOY = (select Max(COY) from invoiceitema where cardnum='24' and cardsection = 'B')
if exists(select * from invoiceitema where cardnum='24' and tablename = 'Rdrecords' and fieldname ='cBlueID')
begin
set @BlueIDCOY = (select COY from invoiceitema where cardnum='24' and tablename = 'Rdrecords' and fieldname ='cBlueID')
if @MaxCOY = @BlueIDCOY
delete from invoiceitema where cardnum='24' and tablename = 'Rdrecords' and fieldname ='cBlueID'
end
set @MaxCOY = (select Max(COY) from invoiceitema where cardnum='24' and cardsection = 'B')
if not exists(select * from invoiceitema where cardnum='24' and tablename = 'Rdrecords' and fieldname ='cBlueID')
begin
insert into invoiceitema values ('24','99','参照兰字ID',1,0,0,NULL,'RdRecords','cBlueID',3,5,NULL,'B','参照兰字ID','参照兰字ID',1,4,840,0,0,0,NULL,NULL,NULL,1,0,0,NULL,0,0,45,@MaxCOY + 1,97,0)
end
if not exists(select * from invoiceitema where cardnum='24' and fieldname ='iTaxUnitPrice' and cardsection = 'B')
begin
insert into invoiceitema values ('24','11','含税单价',0,1,0,NULL,'RdRecords','iTaxUnitPrice',4,1,NULL,'B','含税单价','含税单价',1,16,1080,2,0,1,'|0',NULL,NULL,1,0,0,NULL,0,0,500,@MaxCOY + 2,NULL,0)
end
if not exists(select * from invoiceitema where cardnum = '24' and fieldname = 'iTaxPrice' and cardsection = 'B')
begin
insert into invoiceitema values ('24','15','价税合计',0,1,0,NULL,'RdRecords','iTaxPrice',4,1,NULL,'B','价税合计','价税合计',1,20,1125,2,0,1,'|0',NULL,NULL,1,1,0,NULL,0,0,500,@MaxCOY + 3,NULL,0)
end
if not exists(select * from invoiceitema where cardnum = '24' and fieldname = 'iTaxRate' and cardsection = 'B')
begin
insert into invoiceitema values ('24','19','税率',0,1,0,NULL,'RdRecords','iTaxRate',4,1,NULL,'B','税率','税率',1,20,1125,2,0,1,'|0',NULL,NULL,1,0,0,NULL,0,0,500,@MaxCOY + 4,NULL,0)
end |
|