Hi all,
Greetings
I have two tables which I am trying to combine and I did the below union query and it is working, but I want the data to be in text file.
Please help me on this.
SELECT STAFFID, DATE_, DATE1, NoOfHours, PROJECTID, TASKCODE, DetailedDescription, REMARKS, CRE FROM [TIME SHEET DATA-AS];
UNION SELECT STAFFID, DATE_, DATE1, NoOfHours, PROJECTID, TASKCODE, DetailedDescription, REMARKS, CRE FROM [TIME SHEET DATA-ASAMI];
Regards,
VKKT
COMBINE DATA AS TEXT BY UNION QUERY
-
- Administrator
- Posts: 79526
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: COMBINE DATA AS TEXT BY UNION QUERY
If you want to export the result of the query to a text file:
- Select the query in the navigation pane.
- Activate the External Data tab of the ribbon.
- Click Text File in the Export group.
- Access starts the Export Text Wizard.
- Select Delimited or Fixed Width, then click 'Next >'.
- Depending on your choice, you can specify some other settings, then click 'Next >'.
- Specify the path and filename, and click Finish.
- You'll get the option to save the export steps.
- If you do, you can re-run the export later on both from the Access interface and using VBA: DoCmd.RunSavedImportExport
- Select the query in the navigation pane.
- Activate the External Data tab of the ribbon.
- Click Text File in the Export group.
- Access starts the Export Text Wizard.
- Select Delimited or Fixed Width, then click 'Next >'.
- Depending on your choice, you can specify some other settings, then click 'Next >'.
- Specify the path and filename, and click Finish.
- You'll get the option to save the export steps.
- If you do, you can re-run the export later on both from the Access interface and using VBA: DoCmd.RunSavedImportExport
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 184
- Joined: 13 Jun 2018, 07:50
Re: COMBINE DATA AS TEXT BY UNION QUERY
Thanks Mr. Hans for your immediate response.
Actually I need to have the data in another table in access itself without showing the linked tables drop-in fields.
Now I have another question, how to make the files updated with the new added data only without over wiring the existing data by using a query?
Regards,
VKKT
Actually I need to have the data in another table in access itself without showing the linked tables drop-in fields.
Now I have another question, how to make the files updated with the new added data only without over wiring the existing data by using a query?
Regards,
VKKT
-
- Administrator
- Posts: 79526
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: COMBINE DATA AS TEXT BY UNION QUERY
How can we determine which records are new?
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 184
- Joined: 13 Jun 2018, 07:50
Re: COMBINE DATA AS TEXT BY UNION QUERY
Hi,
Greetings!
‘Date of entry’ field this is auto date n time of entry, this can be taken as a criteria of new record.
Regards,
VKKT
Greetings!
‘Date of entry’ field this is auto date n time of entry, this can be taken as a criteria of new record.
Regards,
VKKT
-
- Administrator
- Posts: 79526
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: COMBINE DATA AS TEXT BY UNION QUERY
Perhaps
INSERT INTO [TargetTable] SELECT * FROM [SourceTable] WHERE [SourceTable].[Date of Entry] > DMax("[Date of Entry]", "[TargetTable]")
INSERT INTO [TargetTable] SELECT * FROM [SourceTable] WHERE [SourceTable].[Date of Entry] > DMax("[Date of Entry]", "[TargetTable]")
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 184
- Joined: 13 Jun 2018, 07:50
Re: COMBINE DATA AS TEXT BY UNION QUERY
Greetings!
It is working well, sorry for the delay in response, I was busy with something else now only I tried this.
Thanks Hans for your support.
Regards,
VKKT
It is working well, sorry for the delay in response, I was busy with something else now only I tried this.
Thanks Hans for your support.
Regards,
VKKT