/*ALIAS>prop_db*/

/*SQLStart>2260*/
ALTER TABLE RENTSINFO
ADD RI_DESCRIPTION VARCHAR(250)
/*SQLStop*/


/*SQLStart>2262*/
CREATE OR ALTER PROCEDURE ADDCOMPDESCR (
    CDESCR VARCHAR(250))
RETURNS (
    CDID INTEGER)
AS
DECLARE VARIABLE W_CDID INTEGER;
begin
  select CD_ID from compdescr
  where  (AClearStr(:CDescr)=aclearstr(CD_STR))
  into   :w_cdid ;

  if( w_cdid is not null) then
    begin
      cdid = w_cdid;
      suspend;
      exit;
    end


  select max(CD_ID) from compdescr
  into :w_cdid;

  if( w_cdid is not null) then
    begin
      w_cdid=w_cdid+1;
    end
  else
    begin
      w_cdid = 1;
    end

  insert into compdescr (CD_ID,CD_Str) Values(:w_cdid,:cdescr);
  cdid = w_cdid;
  suspend;
end;
/*SQLStop*/

/*SQLStart>2264*/
update system_strings set sys_str = '6.7.186.1' where sys_id = 1401;  /*BackOffice*/
/*SQLStop*/