I am trying to drop a column and getting the following error:
ALTER TABLE PS_HR_BARG_UNIT ALTER COLUMN Z_TMP_ALTER_1 CHAR(6) NOT NULL (0 rows affected)
Msg 5074, Level 16, State 8, Server KHIM\EBISSQL5, Line 4
The statistics 'NUM2' is dependent on column 'NUM2'.
Msg 4922, Level 16, State 9, Server KHIM\EBISSQL5, Line 4
ALTER TABLE DROP COLUMN NUM2 failed because one or more objects access
There are no indexes or visible constraints associated with the column. My work around is to use DROP STATISTICS PS_HR_BARG_UNIT.NUM2, however this is a VLDB and my SQL statements are scripted.
Once I drop the statistics for the column I get the following message:
Server: Msg 2767, Level 16, State 1, Line 1
Could not locate statistics 'NUM2' in the system catalogs.
How do I locate the column with the statistics associated with the column and which system catalog is being referenced?