while exists(select 1 from xlhhis..emrzy_doclist where docbill is null)beginupdate xlhhis..emrzy_doclist set docbill=[dbo].[fun_emr_docbill]('') where objid=(select top 1 objid from xlhhis..emrzy_doclist where docbill is null)end