
DECLARE 
 @ANTALN92 DECIMAL(9)
SET @ANTALN92=(SELECT COUNT(*) FROM LD0P0N92)
IF @ANTALN92 = 0
 BEGIN
   UPDATE LD0P0T43 SET AGARTYP = 28171, HUVUDOBJTYP = 28171 WHERE AGARTYP = 28059 AND AGARNR IN (SELECT UPPDRAGIFONR FROM LD0P0N900 )
 END
;
