Sdílet prostřednictvím


Replacing a Table or a Named Query in a Data Source View (Analysis Services)

In Data Source View Designer, you can replace a table, view, or named query in a data source view with a different table or view from the same or a different data source, or with a named query defined in the data source view. When you replace a table, all other objects in an Microsoft SQL Server Analysis Services database or project that have references to the table continue to reference the table because the object ID for the table in the data source view does not change. Any relationships that are still relevant (based on name and column-type matching) are retained. In contrast, if you delete and then add a table, references and relationships are lost and must be recreated.

Note

To replace a table with another table, you must have an active connection to the source data in Data Source View Designer in project mode.

You most frequently replace a table in the data source view with another table in the data source. However, you can also replace a named query with a table. For example, you previously replaced a table with a named query, and now want to revert to a table.

Important

If you rename a table in a data source, follow the steps for replacing a table and specify the renamed table as the source of the corresponding table in the data source view before you refresh a data source view. Completing the replacement and renaming process preserves the table, the table's references, and the table's relationships in the data source view. Otherwise, when you refresh the data source view, a renamed table in data source is interpreted as being deleted. For more information, see Refreshing the Schema in a Data Source View (Analysis Services).

To view instructions about how to replace a table or named query with another table or named query, see How to: Replace a Table or a Named Query in a Data Source View Using Data Source View Designer (Analysis Services).