
									select Error_Message as "Error_Msg"
									from dbo.p_PersonPolis_upd(
									    PersonPolis_id := '120101009699692',
									    Server_id := (
									        select
									            case when (select Server_id from dbo.v_PersonEvn where Server_id = '0' and PersonEvn_id = '120101009699692') is null
									                then (select Server_id from dbo.v_PersonEvn  where PersonEvn_id = '120101009699692')
									                else (select Server_id from dbo.v_PersonEvn where Server_id = '0' and PersonEvn_id = '120101009699692')
									            end
									    ),
									    Person_id := '79654',
									    OmsSprTerr_id := '12670',
									    PolisType_id := '4',
									    OrgSmo_id := '691646',
									    Polis_Ser := '',
									    PolisFormType_id :='64',
									    Polis_Num := '1251930886000142',
									    Polis_begDate := '2014-02-13',
									    Polis_endDate := NULL,
									    pmUser_id := '392536762849'
									);
								
