Forum Discussion

SagarB's avatar
SagarB
Frequent Visitor
2 years ago
Solved

Stored procedures with parameters in a Direct Query connection

How to get data from a SQL-server by using stored procedures with parameters in a Direct Query connection? Facing Error (Microsoft SQL: Incorrect syntax near the keyword 'EXEC')  I've tried using P...
  • VijayP's avatar
    2 years ago

    SagarB 

    CREATE VIEW MyView AS
    SELECT * FROM MyTable WHERE Column1 = 'Value1';

    or use Query Folding by adding extra steps in using M Language

    #"Filtered Rows" = Table.SelectRows(Sales, each [SaleDate] >= #date(2023, 1, 1) and [SaleDate] <= #date(2023, 12, 31))