467,883 Members | 1,245 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,883 developers. It's quick & easy.

Problem in Automatically generated columns while copying schema

Hi,

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/
funcs.

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?

Thanks

Rahul

Aug 14 '07 #1
  • viewed: 1147
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by WKC | last post: by
15 posts views Thread by Hemant Shah | last post: by
3 posts views Thread by michael haller | last post: by
10 posts views Thread by Brian Henry | last post: by
8 posts views Thread by julia_beresford | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.