упало тут
Цитата: prompt ***** Cards.sql *****;
begin
SMInitNewField('SMCard', 'UseTime', 'NUMBER(5)');
SMInitNewField('SMCard', 'UseTimeDim', 'NUMBER(5)', '3', 1);
SMInitNewConstraint('SMCard', 'SMCCard_UseTime',
'check(UseTime>0)');
SMInitNewConstraint('SMCard', 'SMCCard_UseTimeDim',
'check(UseTimeDim>=0 and UseTimeDim<=3)');
end;
/
begin
SMInitNewField('SACardPropDef', 'Position', 'NUMBER(10)');
end;
/
declare
i pls_integer;
begin
select count(*) into i from user_tab_columns
where table_name=upper('SACardPropDef') and column_name=upper('Position')
and NULLABLE='Y';
if i=1 then
execute immediate 'alter table SACardPropDef disable all triggers';
i := 0;
for vRec in (select ID from SACardPropDef order by Name)
loop
update SACardPropDef set Position=i where ID=vRec.ID;
i := i+1;
end loop;
execute immediate 'alter table SACardPropDef modify Position not null';
execute immediate 'alter table SACardPropDef enable all triggers';
end if;
end;
/
begin
SMInitNewConstraint('SACardPropDef', 'SACCardPropDef_Pos_Unique',
'unique(Position) deferrable initially deferred');
end;
/
commit;
-- end Cards.sql
пихаем в скуль... выполняется без ошибок - идем дальше...