Re: Union data from two databases
From: John Viescas (JohnV_at_nomail.please)
Date: 03/11/04
- Next message: Douglas J. Steele: "Re: Concatenation"
- Previous message: John Viescas: "Re: Selecting data with CHOOSE"
- In reply to: Steven: "Re: Union data from two databases"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Mar 2004 17:14:53 -0600
Close. I find it's easiest to link the table and then look at the Connect
property of the linked TableDef. Try this IN clause:
IN "" [MS Access;PWD=joven1;DATABASE=C:\MyDatabases\ArchivedHistory.mdb]
-- John Viescas, author "Microsoft Office Access 2003 Inside Out" "Running Microsoft Access 2000" "SQL Queries for Mere Mortals" http://www.viescas.com/ (Microsoft Access MVP since 1993) "Steven" <anonymous@discussions.microsoft.com> wrote in message news:b62901c4078f$30ca2b50$a101280a@phx.gbl... > Thank you for the response. And if the history database > has a password then I can just pass the password in the > sql statement with the > IN "C:\MyDatabases\ArchivedHistory.mdb ; PWD=joven1" > or something like that. > > Thanks. > > Steven > > > > >-----Original Message----- > >Steven- > > > >A simple way is to use the IN clause directly in the SQL: > > > >SELECT * > >FROM tblClientHistory > >WHERE ClientID = 555 > >UNION > >SELECT * > >FROM tblClientHistory > >IN "C:\MyDatabases\ArchivedHistory.mdb" > >WHERE ClientID = 555 > > > >-- > >John Viescas, author > >"Microsoft Office Access 2003 Inside Out" > >"Running Microsoft Access 2000" > >"SQL Queries for Mere Mortals" > >http://www.viescas.com/ > >(Microsoft Access MVP since 1993) > >"Steven" <anonymous@discussions.microsoft.com> wrote in > message > >news:836501c40785$6a9c75e0$a601280a@phx.gbl... > >> I have too many records in my database and want to store > >> some of the history in a second database. I want to be > >> able to access the data in the history database and > query > >> on certain criteria like ClientId = "?????" and Union > this > >> with the current data from the main table in the current > >> database. I have a little experience with workspaces, > if > >> that is what you use, but I do not see how to union data > >> from different databases and create a recordset to use > as > >> a controlsource for a form or report. > >> > >> Thank you for your help. > >> > >> Steven > > > > > >. > >
- Next message: Douglas J. Steele: "Re: Concatenation"
- Previous message: John Viescas: "Re: Selecting data with CHOOSE"
- In reply to: Steven: "Re: Union data from two databases"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|