Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Merge Querry - efficiency

I have an SQL table that more than 400 Million rows and I only need about 200 thousand. I thought I could inner merge the querries based on project number to only pull the 200k rows. But it seems as ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    I'm assuming that your SQL table means SQL Server. For this either you or your DBA should write a query with WHERE conditions to restrict the data being returned. Better yet, a stored procedure or view could be used. However you do it, you enter the query in this way.

     

    1. Click Get Data.

    2. Choose SQL Server.

    3. Enter your Server and Database names.

    4. Choose Import or DirectQuery.

    5. Under the DirectQuery radiobutton, click the "Advanced options" item to open several additional options.

    6. Enter your query or stored procedure statement in the "SQL statement" box.

     

    If you want to go the route of a stored procedure, there are probably several articles about using one with Power BI. Here is one.