Running a Stored Procedure from MS-Query

I have created a stored sql procedure to run within a MS-Query. The problem I have is that I can pass the parameters from Excel to the SP without a problem. However, the end user cannot becuase they do not have the proper permissions on the SQL server.

In another recent Experts Exchange answer to another question I was given the line of code:

Msg 15517, Level 16, State 1, Procedure GetIPAProcCnt_Summary, Line 0Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.

It looks like I cannot get around this roadblock.

The Stored Procedure runs correctly without the "with execute as owner" when I execute the stored procedure from the Object Explorer.

Thanks for the grade. When I wrote the article my client was an airline, and nothing was considered confidential, so security wasn't an issue.

With almost every other client, including my current healthcare one, I've always needed two things to make this work: (1) Business Users who will sit down and 'own' the groupings of various roles, and which business users are in that role, and (2) In absence of the developer being able to do this a DBA willing to take that list, create the roles, and assign groups to roles.

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation)
David Miller (dlmille)
Synopsis
In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…

This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.