Save Query Results as table to another Access Database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an access database that users use to pull reports (stored procs in sql
server) and it paste the data on 4 sheets in excel. Occasionally the reports
are too big for excel.

I'd like to develop a similar database that saves the results of the 4
stored procs as tables in a new Access database.

right now I have it returning the results as a query.

How do I save the results in another database?

Thanks,
--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003
 
Hi Billy

The following SQL statement should do it for you:

SELECT * INTO [TableName]
IN 'C:\Path\External DB.mdb'
FROM [QueryName];
 
thanks Graham that helps a lot.

How can I make it create the database if it doesn't already exist?
--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003


Graham Mandeno said:
Hi Billy

The following SQL statement should do it for you:

SELECT * INTO [TableName]
IN 'C:\Path\External DB.mdb'
FROM [QueryName];
--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand


BillyRogers said:
I have an access database that users use to pull reports (stored procs in
sql
server) and it paste the data on 4 sheets in excel. Occasionally the
reports
are too big for excel.

I'd like to develop a similar database that saves the results of the 4
stored procs as tables in a new Access database.

right now I have it returning the results as a query.

How do I save the results in another database?

Thanks,
--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003
 
Hi Billy

Dim dbNew as DAO.Database
Set dbNew = DBEngine.CreateDatabase( "C:\Path\External DB.mdb" )
dbNew.Close

--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

BillyRogers said:
thanks Graham that helps a lot.

How can I make it create the database if it doesn't already exist?
--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003


Graham Mandeno said:
Hi Billy

The following SQL statement should do it for you:

SELECT * INTO [TableName]
IN 'C:\Path\External DB.mdb'
FROM [QueryName];
--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand


BillyRogers said:
I have an access database that users use to pull reports (stored procs
in
sql
server) and it paste the data on 4 sheets in excel. Occasionally the
reports
are too big for excel.

I'd like to develop a similar database that saves the results of the 4
stored procs as tables in a new Access database.

right now I have it returning the results as a query.

How do I save the results in another database?

Thanks,
--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003
 
Back
Top