|
|
Save Query Results as table to another Access Database
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
|
|
0
|
|
|
|
Reply
|
Utf
|
10/18/2007 7:43:01 PM |
|
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" <BillyRogers@discussions.microsoft.com> wrote in message
news:9242B097-D2C5-4B2B-BF47-F09E16EF94D5@microsoft.com...
>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
|
|
0
|
|
|
|
Reply
|
Graham
|
10/18/2007 8:11:41 PM
|
|
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" wrote:
> 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" <BillyRogers@discussions.microsoft.com> wrote in message
> news:9242B097-D2C5-4B2B-BF47-F09E16EF94D5@microsoft.com...
> >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
>
>
|
|
0
|
|
|
|
Reply
|
Utf
|
10/18/2007 8:37:01 PM
|
|
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" <BillyRogers@discussions.microsoft.com> wrote in message
news:75D5D8F2-6E06-49CA-8BA6-5C8619576F2C@microsoft.com...
> 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" wrote:
>
>> 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" <BillyRogers@discussions.microsoft.com> wrote in message
>> news:9242B097-D2C5-4B2B-BF47-F09E16EF94D5@microsoft.com...
>> >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
>>
>>
|
|
0
|
|
|
|
Reply
|
Graham
|
10/19/2007 12:34:33 AM
|
|
|
3 Replies
1083 Views
(page loaded in 1.463 seconds)
|
|
|
|
|
|
|
|
|