On Jun 24, 3:55=A0pm, Erland Sommarskog <esq...@[EMAIL PROTECTED]
> wrote:
> =A0(quincy...@[EMAIL PROTECTED]
) writes:
> > Ok I think we are on to something here...not sure what...I get back
> > one cell with begin_call in it for this query.
> > The application when it works does the following:
> > We have a table begin_call we want to modify it in some arbitrary
> > way. =A0So we do this.
> > We create begin_call_temp with the structure we want.
> > Then we transfer existing data from begin_call to begin_call_temp
> > using inerrt into.
> > Then we drop begin_call. .
> > Then we do a sp_rename begin_call_temp begin_call.
>
> > This entire sequence has worked at least once. =A0
>
> Yes, it works the first time. It does not work the second time, because
> apparently you forgot to rename the primary key when you renamed the
> table.
Yes I added
EXEC sp_rename 'begin_call_temp.PK_begin_call_temp',
'PK_begin_call','index';
Before
EXEC sp_rename 'begin_call_temp','begin_call';
And it all seems to work.
Thank you,
David
>
> --
> Erland Sommarskog, SQL Server MVP, esq...@[EMAIL PROTECTED]
>
> Books Online for SQL Server 2005
athttp://www.microsoft.com/technet/prodt=
echnol/sql/2005/downloads/books...
> Books Online for SQL Server 2000
athttp://www.microsoft.com/sql/prodinfo/=
previousversions/books.mspx


|