Hide SQL Query

  • Thread starter Thread starter Wayne Wengert
  • Start date Start date
W

Wayne Wengert

Is there a way to hide (or at least prevent editing) of the Query used to
get data from an SQL Server?

Wayne
 
Wayne Wengert said:
Is there a way to hide (or at least prevent editing) of the Query used to
get data from an SQL Server?

Wayne

Hide from who? The Excel user? The Profiler? Where do you keep your query?

/Fredrik
 
Sorry... from the user. The users know just enough to be dangerous
(<smile>).

I built the query from within the spreadsheet. Right now, if you click on a
cell in the data range you get a popup that, among other things, has the
option "Edit". That is not good in our environment.

Wayne
 
If you lock the Extracted Data range and Protect the Wsht, then the Edit
Query in not available on right clicking a cell in the data range.
The downside is that you will need to Unprotect/Refresh data/Reprotect the
sheet.
 
Wayne said:
... from the user. The users know just enough to be dangerous
(<smile>).

If you don't want them to change the SQL e.g. retain the same column
order, the same WHERE clause etc then put the query into a stored
procedure and call the proc from MS Query. They could of course still
completely change the call e.g. to another stored proc or write their
own SELECT query.

Jamie.

--
 
Thanks for the suggestions. The SP is probably the best route.

Wayne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top