> At 12:57 PM 17/11/2008, you wrote:
>>Hi all,
>>
>>I have a need to change an Integer field to a Numeric(18,0), and it's a
>> primary
>>key, that's referenced by about 24 tables.
>>
>>Do I really have to:
>>Drop each foreign key constraint
>>Drop the primary key constraint
>
> /* Don't need these steps */
>
>>Copy the field to a temporary field
>>Drop the original field
>>Create a new one of the new type, with the original field name.
>
> /* */
>
> You might as well upsize the FK cols while they are out of commission.
> You'll need to do it anyway, once your PK gets close to the max for a
> 32-bit integer.
>
>>Re-instate the primary key contraint
>>and re-instate all the foreign key constraints?
>>
>>Hopefully there's a quicker solution... :-)
>
> Get a fast dicta typist to type your script? ;-)
>
> ./heLen
>
>
Flame Robin's 'generate rebuild script' types pretty quick ;-} -> Max