while(@@fetch_status=0)
begin
--insertintosubip(supip)values(@subip)
insertintosubipselectuserinfo.username,userinfo.catalyst_port,userinfo.home_address,
userinfo.ip_address,userinfo.phone,catalyst.label,fromuserinfo,
catalystwhereuserinfo.catalyst_id=catalyst.idandsubstring(userinfo.ip_address,8,3)=@subip
set@result=@@rowcount
if(@result>37)
begin
while(@result<74)
begin
insertintosubipselect
username=,catalyst_port=,home_address=,ip_address=,phone=,label=,account=
set@result=@result+1
end
end
else
begin
while(@result<37)
begin
insertintosubipselect