MS Access Stored procedure , result into table

dh_ander

Board Regular
Joined
Jul 31, 2006
Messages
119
I wrote a sql pass through query which executes a storede procedure on my SQL server
All the code I need is : execute dbo.msp_Fill_CEDS

Now I want to put the result into a table "hlptblTest" in my access database.

The result of my stored procedure is a table with 3 colums my table "hlptblTest" also has 3 colums.

What would be the syntax to put the result of my stored procedure straight into my table?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi David,

Try this:

1. Build a second pas-through query that retrieves the output table from the stored procedure
2. Use a Make-table or Append query to push this into your local table

When you want to update data, run 3 SQL statements in sequence:
The stored procedure
A Delete query to clean out the data in the Access table
The Update query to push in the new data.

Note: this will work only if you do NOT have a primary key field in your Access table. In circumstances where I am pulling data in from a SQL source and may be refreshing everything, I don't bother with a local primary key

Denis
 
Upvote 0

Forum statistics

Threads
1,214,959
Messages
6,122,476
Members
449,087
Latest member
RExcelSearch

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top