Hi,

> i´m using firebird-server-classic-2.1.3.18185.0-5mdv2010.0

In that case, here's how DBW does it for you:

// delete field dependencies for field "MYTESTFIELD"
delete from rdb$dependencies
where rdb$dependent_name = (select f.rdb$field_name
from rdb$fields f
join rdb$relation_fields rf on rf.rdb$field_source = f.rdb$field_name
where rf.rdb$relation_name = 'DML_TEST1' and rf.rdb$field_name = 
'MYTESTFIELD');

// add temporary test field
ALTER TABLE DML_TEST1 ADD DBW$$TEMP COMPUTED BY ( 'test' || 'moere' );

// copy generated BLR from temp test field to your test field
UPDATE rdb$fields SET RDB$COMPUTED_BLR = (select RDB$COMPUTED_BLR from 
rdb$fields where rdb$field_name = (select rdb$field_source from 
rdb$relation_fields where rdb$field_name = 'DBW$$TEMP' and rdb$relation_name 
= 'DML_TEST1')),
    RDB$COMPUTED_SOURCE = (select RDB$COMPUTED_SOURCE from rdb$fields where 
rdb$field_name = (select rdb$field_source from rdb$relation_fields where 
rdb$field_name = 'DBW$$TEMP' and rdb$relation_name = 'DML_TEST1'))
WHERE rdb$field_name = (select rdb$field_source from rdb$relation_fields 
where rdb$relation_name = 'DML_TEST1' and rdb$field_name = 'MYTESTFIELD');
COMMIT;

// create valid new dependencies
insert into rdb$dependencies
select * from rdb$dependencies
where rdb$dependent_name = (select f.rdb$field_name
from rdb$fields f
join rdb$relation_fields rf on rf.rdb$field_source = f.rdb$field_name
where rf.rdb$relation_name = 'DML_TEST1' and rf.rdb$field_name = 
'DBW$$TEMP');

// drop temporary computed field
ALTER TABLE DML_TEST1 DROP DBW$$TEMP;



If this doesn't help for you, I'd be interested in a copy of the database to 
see what's going on. ;)


Hope this helps.

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird! 



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    firebird-support-dig...@yahoogroups.com 
    firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to