View Single Post
  #3  
Old January 27th, 2010, 08:49 AM posted to microsoft.public.access.tablesdbdesign
elizas
external usenet poster
 
Posts: 1
Default Changing the name of a table that then relates to a query

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/dat...evelopment.htm
Aimee Proctor wrote:
I changed the name of a table that relates to a lot of queries.....these now wont work....how do i resolve this....thanks for ANY news!

Submitted via EggHeadCafe - Software Developer Portal of Choice
ADO.NET Recursive Hierarchical DataSet Technique
http://www.eggheadcafe.com/tutorials...e-hierarc.aspx