Opa Desculpa Pela demora la vai a Query pra rodar os Baus sem travar o serve!
-----------------------------------------------------------------------------------------
1° QUERY
-- ####### CORRECAO DE TROCA DE BAU
-- EXCLUIR PROC WHS_SELECT_UP
DROP proc WHS_SELECT_UP
2° QUERY
-- ####### CORRECAO DE TROCA DE BAU PARTE 2
CREATE proc WHS_SELECT_UP
@num int,
@aid varchar(10)
as
set nocount on
declare @cknum int
SELECT @cknum=NeedExtCK FROM warehouse WHERE AccountID=@aid
if @cknum is null begin
INSERT INTO warehouse (AccountID, Items, Money, EndUseDate, DbVersion)
VALUES (@aid,cast(REPLICATE(char(0xff),1200) as varbinary(1200))
,0, getdate(), 2)
end
Update warehouse Set NeedExtCK=@num WHERE AccountID=@aid
Select @num AS NeedExtCK
set nocount off
GO
Att : antoniodel
-------------------------------------------------------------------------------------------------