LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Archiving specific records to access

Myrna Larson wrote:
It may be possible to import records directly from Excel into Access

with a
criterion such as the date.


You can bypass MS Access and put the data directly into the database
e.g.

INSERT INTO MyArchive ([START-DATE], [ARCHIVE-DATE], <other columns
here)
SELECT [START-DATE], [ARCHIVE-DATE], <other columns here
FROM [Excel 8.0;HDR=YES;Database=C:\MyBook.xls;].[BusinessUnit1$]
WHERE [ARCHIVE-DATE] = DATE()
UNION ALL
SELECT [START-DATE], [ARCHIVE-DATE], <other columns here
FROM [Excel 8.0;HDR=YES;Database=C:\MyBook.xls;].[BusinessUnit2$]
WHERE [ARCHIVE-DATE] = DATE()
UNION ALL
SELECT [START-DATE], [ARCHIVE-DATE], <other columns here
FROM [Excel 8.0;HDR=YES;Database=C:\MyBook.xls;].[BusinessUnit3$]
WHERE [ARCHIVE-DATE] = DATE()
UNION ALL
....
UNION ALL
SELECT [START-DATE], [ARCHIVE-DATE], <other columns here
FROM [Excel 8.0;HDR=YES;Database=C:\MyBook.xls;].[BusinessUnit8$]
WHERE [ARCHIVE-DATE] = DATE();

Perhaps the criterion required is <= DATE(), though.

Jamie.

--

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating & Archiving Records sandy Excel Worksheet Functions 4 June 11th 09 05:43 PM
Looukp Specific Records Tony Montana Excel Worksheet Functions 4 February 25th 08 03:03 PM
Deleting specific records [email protected] Excel Discussion (Misc queries) 6 June 22nd 05 11:35 PM
select records with a specific value AMK Excel Worksheet Functions 3 June 22nd 05 11:53 AM
Can You Query Specific Access Records from Excel? neptune[_2_] Excel Programming 1 May 7th 04 09:07 PM


All times are GMT +1. The time now is 05:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"