By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,611 Members | 2,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,611 IT Pros & Developers. It's quick & easy.

Problem in Automatically generated columns while copying schema

P: n/a

I have a table where one of the columns is automatically generated as
a substring of values of some other column.
When i create a copy of that schema using sysproc.admin_copy_schema,
the table goes in pending state, because the data in the table was
inserted fully and the column was not automatically generated(i think
this is the reason).

I tried to get it out of pending state by issuing "SET
Integrity........." and Reorg table ......." commands.
But nothing worked.
I can't even delete data from that table, nor do a select or update.

So i had to resort to drop that table, and in turn drop a few procs/
funcs to drop that.
then recreate that table with DDL scripts, recreate other procs/

Finally, i had to insert data like
"Insert into schema2.table(col1, col2.................col(n-1)) select
col1, col2, col3, .....col(n-1) from schema1.table"

so that the column n was automatically generated.

I am quite sure, this was only a workaround and not the correct way(I
am working in a dev database, and not a prod one, so, the workaround
was quite effective).

Can anybody please help as how to tackle the problem in a correct way?



Aug 14 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.