Forum Discussion
NancySharma
8 years agoRegular Visitor
Way to query data using SQL and csv file
I want to query my sql database based on some fields in csv file. When i connect to query can i use the query to connect this way for example. SELECT Column1 ,Column2 ,Column3 ...
Phil_Seamark
8 years agoMicrosoft Employee
Hi NancySharma
All the work should be done in Power Query (which sits before Power BI). You can query your CSV file and you will have to read all of it. Then in Power Query, you can generate a list values from the CSV file that you are interested in and finally use that list inside your T-SQL query statement in the WHERE clause.
NancySharma
8 years agoRegular Visitor
Yes i tried this approach but apparently when i refresh my csv file this query stops working. Is there a workaround for that or any other solution.