Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Using inputted parameters

Author  Topic 

swirls
Starting Member

5 Posts

Posted - 2010-07-14 : 00:42:31
Hi,

I'm currently using an external data connections in Excel to the sql server to retrieve information for a particular report. I'm able to retrieve the full report when connections are refreshed however, would like to know if it's possible to create a report but have parameters entered when a person opens the report.

E.g. Full report with current query is showing all customer details. I would like to have the same query with a Customer ID filter condition. And when a user opens the excel file, they are prompted to enter a Customer ID and then the value is inserted into the query and details of a particular customer is retrieved accordingly.

Is this possible to do in excel and how do I include this user input parameter into the query if possible?

Thanks.

pk_bohra
Master Smack Fu Yak Hacker

1182 Posts

Posted - 2010-07-14 : 01:23:31
I feel it can be done using Macros in excel.
Go to Top of Page

swirls
Starting Member

5 Posts

Posted - 2010-07-14 : 02:56:43
Do you have any ideas on how it can be achieved through a macro? What should will I need to include in my query or the macro in order to do this?
Go to Top of Page
   

- Advertisement -