| View previous topic :: View next topic |
| Author |
Message |
imissmysol Newbie

Joined: 20 Jun 2012 Posts: 1
|
Posted: Wed Jun 20, 2012 6:08 pm Post subject: Join multiple tables that use a common identifier field |
|
|
I have a ACCESS DB that has multiple tables that have a common field that is used.
For example, In table one the ID field is accompanied by FIELDS A B AND C
In table two, the ID field is accompanied by fields D E AND F
In table three, the ID field is accompanied by fields D G AND C
I want to make one table that has the ID field and B, C, D, E (for example)
I know how to do the query, but if i select the same field from both tables, it will not work. I need it to combine all of the information but not modify the ID field (other than add more records). I need all of the information related to each ID field in the respective table to be brought into one place. The intent is to export it as a csv at some point so I can import it into Outlook or Salesforce or both. |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2474 Location: 3rd Rock From The Sun
|
Posted: Thu Jun 21, 2012 9:02 am Post subject: |
|
|
| imissmysol wrote: | I have a ACCESS DB that has multiple tables that have a common field that is used.
I know how to do the query, but if i select the same field from both tables, it will not work. |
I do not understand your comment above. By first clicking on the Queries icon on the left, under Tasks, are you creating the Query by:
- Create Query in Design View...
- Use Wizard to Create Query...
I strongly recommend you use the first one above ( Create Query in Design View... ), and, follow these steps.
- Open your OpenOffice Base file ( *.odb )
- When the Add Table or Query pop-up is presented, click on the tables you want in your query, and, click on the Add button
- Click on the Close button
- On the screen that is presented, at the top, left click, and drag the ID field(s) that you want to 'relate' to the other ID fields so it looks like the graphic in post below by Sliderule ( click link below to see it
) -- this is step number 7:
http://www.oooforum.org/forum/viewtopic.phtml?t=51739
- You can decide on the Fields you want in your Query by EITHER:
- On the Field line, choose the field you want included in the display
- Double click on the Field name[/bolor] in the top portion that you want included in the display
- [color=blue]Single click on the Field name
in the top portion that you want included in the display and drag it the the Field line below
- Single click on the Field name in the top portion that you want included in the display and press the Enter key, it will now show up on the Field line below
- Run your Query by EITHER:
- Press your F5 key
- On the Toolbar, press the Run Query(f5) icon
- From the Menu: Edit -> Run Query
- Save your Query
- Since, when you created your OpenOffice Base file ( *.odb ) [ and you Registered the name ]to connect to your Access database, now you can move the data, from your saved Query, to a Calc spreadsheet so that it can be 'saved' in CSV format.
- From the Menu: File -> New -> Spreadsheet
- EITHER:
- Press F4 key
- From the Menu: View -> Data Sources
- Expand the list for your Registered Database name
- Expand the Queries
- Click on the name of the Query you saved above, and, DRAG it to a spot on the Calc spreadsheet ( probably want it in cell A1 )
- The data from your OpenOffice connected database will now appear in the Calc spreadsheet
- You now want to save this as a CSV file, so:
- From the Menu: File -> Save As...
- Under Save as type... YOU SHOULD CHOOSE Text CVS (*.csv)
- Assign a File name: of your choosing
- Press the Save button
- Smile and say: "Gee Sliderule, that was easy, now, all I have to do is mark the forum post as [Solved] per the instructions at the bottom."
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|