469,090 Members | 1,096 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

It is not a real index but exists as statistics only

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
0 1404

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by sql_server_2000_user | last post: by
8 posts views Thread by Andr? Queiroz | last post: by
14 posts views Thread by Sean C. | last post: by
1 post views Thread by Evan Smith | last post: by
9 posts views Thread by WalterR | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.