Changing the name of a table that then relates to a query

J

Jerry Whittle

1. Change the table name back to its orginal name.

2. Download Rich Fisher's excellent Find and Replace add-in and change
everything to match the new table name. If you register it (one of the best
$37 I've ever spent), the cross-reference report can find what queries use
which reports and forms. It's a good way to find orphans.
http://www.rickworld.com/

3. Enable Name Autocorrect so that you won't have this problem in the
future. However Name Autocorrect is often a problem and I don't recommend
using it.

4. Remember that changing the name of a table, field in a table, query, and
possibly even forms and reports can cause this problem. It's better to get
the names right in the first place or don't mess with them.
 
E

elizas

Hi,
please check it it helps.Suppose there is requirement for selecting
records from more than one Database.
Let's say, you have different databases for different branch (say: BRANCH1_DB,
BRANCH2_DB, BRANCH3_DB).
For getting all employees name write the following query:
SELECT (FIRST_NAME + ' ' + LAST_NAME) AS EMPLOYEE_NAME FROM BRANCH1_DB.dbo.
EMPLOYEE_INFO
UNION ALL
SELECT (FIRST_NAME + ' ' + LAST_NAME) AS EMPLOYEE_NAME FROM BRANCH2_DB.dbo.
EMPLOYEE_DETAILS
UNION ALL
SELECT (FNAME + ' ' + LNAME) AS EMPLOYEE_NAME FROM BRANCH3_DB.dbo.EMPLOYEE

Thanks
Eliza
http://www.mindfiresolutions.com/database-and-client-server-development.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top