troubleshooting Question

Reading a Cell values in a SQL import statement in Power Pivot for Excel Link to filter data from SQL DB

Avatar of flemingg62
flemingg62 asked on
Microsoft SQL ServerMicrosoft Excel
9 Comments1 Solution47 ViewsLast Modified:
I have an Excel data model that reads data from a SQL DB, the SQL data contains data from many projects.  I have got it to work where I manually type in the number  i.e. WHERE   [Survey-Data].[Adept Survey UID] = 398
but what I want to be able to do is say type a Project number (Numeric) in a cell (Say cell F3 in Sheet Test) and then only pull that data from the SQL DB for the Project Number in that cell
ScreenShot

SELECT
  [Survey-Data].[Adept Survey UID]
  ,[Survey-Data].[Accordant SUS UID]
  ,[Survey-Data].DataUID
  ,[Survey-Data].[Survey Time]
  ,[Survey-Data].[Report Time]
FROM
  [Survey-Data]
WHERE   [Survey-Data].[Adept Survey UID] = Cell F3 in Sheet "Test"
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros