Forum Discussion

kcdavi01's avatar
kcdavi01
Frequent Visitor
5 months ago
Solved

Connecting to Data: PostgreSQL (Function) error

Hi all, I hope all is well! I have a client that would like to connect to a PostGreSQL function (vs a table) but we're running into an error message when trying to connect via a Power Query M script:...
  • MFelix's avatar
    5 months ago

    Hi kcdavi01 ,

     

    Believe that you problem is with the syntax of the Passed where you have added and additional '

     

     

    Try the following:

     

    PostgreSQL.Database("SERVER", "DATABASE", [Query="SELECT * FROM FUNCTION('" & StartDate & "', '" & EndDate & "', '" & DataType & "', '" & Status & "')"])