Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

error supquery returned more than 1 value

$
0
0

UPDATE

rs_current_runtime


SET

processed_date =NULL


WHERE

CORP_PRFT_CTR IN


(SELECT LOC_NUM

FROM RET_LOC_INFO

WHERE LIVE_IN_PRICEBOOK='Y')


GO

WHILE

(SELECTCOUNT(*)FROM rs_current_runtime

      

WHERE processed_dateISNULL)> 0


BEGIN



   

DECLARE @CurCorpPrftCtrint



   

SET @CurCorpPrftCtr=(SELECTMIN(a.corp_prft_ctr)


        

FROM rs_current_runtime a

        

WHERE a.processed_dateISNULL


        

AND a.is_updated=(SELECTMIN(b.is_updated)


             

FROM rs_current_runtime b

             

WHERE b.processed_dateISNULL))



   

EXEC [dbo].[CalculateEffectiveRetail]


@CorpProfitCenter = @CurCorpPrftCtr,


@ProcessPriceChangeRequired

= 1

   

UPDATE rs_current_runtime

   

SET processed_date=GETDATE()


   

WHERE corp_prft_ctr= @CurCorpPrftCtr


END

GO


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>