Export (0) Print
Expand All

How to: Replace a Table or a Named Query in a Data Source View Using Data Source View Designer

Updated: 14 April 2006

You use Business Intelligence Development Studio to add, view, modify, or delete a named query in an Analysis Services project or database.

ms174829.note(en-US,SQL.90).gifNote:
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.

ms174829.note(en-US,SQL.90).gifImportant:
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.

  1. In Business Intelligence Development Studio, open the project or connect to the database that contains the data source view in which you want to replace a table or a named query.

  2. In Solution Explorer, expand the Data Source Views folder, then open the data source view in Data Source View Designer by doing one of the following:

    • Double-click the data source view.
    • Right-click the data source view and click Open.
    • Click the data source view and then on the View menu, click Open.
  3. Open the Create Named Query dialog box by doing one of the following:

    • In either Tables or Diagram pane, right-click the table that you wish to replace, point to Replace Table and then click With New Named Query.
    • In either Tables or Diagram pane, click the table that you wish to replace and then point to Replace Table on the Data Source View menu and then click With New Named Query.
  4. In the Create Named Query dialog box, define the named query and then click OK. For information about defining named queries, see How to: Add, View, Modify, or Delete a Named Query Using Data Source View Designer.

  5. Save the modified data source view by doing one of the following:

    • On the File menu, click Save Selected Items or Save All.
    • On the Data Source View Designer toolbar, click Save Selected Items or Save All.
    • Close the Data Source View Designer in Business Intelligence Development Studio and then click Save when prompted.

  1. In Business Intelligence Development Studio, open the project or connect to the database that contains the data source view in which you want to replace a table or a named query.

  2. In Solution Explorer, expand the Data Source Views folder, then open the data source view in Data Source View Designer by doing one of the following:

    • Double-click the data source view.
    • Right-click the data source view and click Open.
    • Click the data source view and then on the View menu, click Open.
  3. Open the Replace Table with Other Table dialog box by doing one of the following:

    • In either Tables or Diagram pane, right-click the table or named query that you wish to replace, point to Replace Table and then click With Other Table.
    • In either Tables or Diagram pane, click the table or named query that you wish to replace and then point to Replace Table on the Data Source View menu and then click With Other Table.
  4. In the Replace Table with Other Table dialog box:

    1. In the Data Source drop-down list box, select the desired data source
    2. Select the table with which you wish to replace the table or named query
  5. Click OK.

  6. Save the modified data source view by doing one of the following:

    • On the File menu, click Save Selected Items or Save All.
    • On the Data Source View Designer toolbar, click Save Selected Items or Save All.
    • Close the Data Source View Designer in Business Intelligence Development Studio and then click Save when prompted.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft