What is wrong with below script
select 'EXEC sp_dropextendedproperty
@name = ''MS_Description''
,@level0type = ''schema''
,@level0name = ' + object_schema_name(extended_properties.major_id) + '
,@level1type = ''table''
,@level1name = ' + object_name(extended_properties.major_id)
from sys.extended_properties
where extended_properties.class_desc = 'OBJECT_OR_COLUMN'
and extended_properties.minor_id = 0
and extended_properties.name = 'MS_Description'
It is giving me
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "extended_properties.class_desc" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "extended_properties.minor_id" could not be bound.
Thanks in advance
select 'EXEC sp_dropextendedproperty
@name = ''MS_Description''
,@level0type = ''schema''
,@level0name = ' + object_schema_name(extended_properties.major_id) + '
,@level1type = ''table''
,@level1name = ' + object_name(extended_properties.major_id)
from sys.extended_properties
where extended_properties.class_desc = 'OBJECT_OR_COLUMN'
and extended_properties.minor_id = 0
and extended_properties.name = 'MS_Description'
It is giving me
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "extended_properties.class_desc" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "extended_properties.minor_id" could not be bound.
Thanks in advance