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

It is not a real index but exists as statistics only

P: n/a
neo
Hi,
On SQL2k with SP3,
I wtote a script to change data type for a column in several tables.
eq. alter table CorrectionEQDiv Alter Column qSrc int not null
I'm getting an error saying
"ALTER TABLE ALTER COLUMN qSrc failed because one or more objects
access this
column."

So I looked at the table and found there are some "STATISTICS" on the
column,
causing the Alter Table failure.

I tested the ALTER TABLE on test DB
and it worked and that DB doesn't have this "Internat index".
But when I ran my script to another DB, I got that error.
Both DB have Auto Create Stats. option ON.
There is no replication.
Anyone have any idea?
Thanks,

/****** The index created by the following statement is for internal
use only. ******/
/****** It is not a real index but exists as statistics only. ******/
if (@@microsoftversion > 0x07000000 )
EXEC ('CREATE STATISTICS [qSrc] ON [dbo].[CorrectionEQDiv] ([qSrc]) ')
GO
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.