Parameter in ODBC PowerQuery

DanielS
Posts: 1
Joined: Thu Jun 20, 2019 6:51 pm

Parameter in ODBC PowerQuery

Postby DanielS » Thu Jun 20, 2019 6:59 pm

Hi Everyone,

I've tried to use a parameter from Excel cell to modify an ODBC Query from AS400 Database like this:

let
BUPKTO = Kunde,
Quelle = Odbc.Query("dsn=AS400", "SELECT BBU00.BUFNR, BBU00.BUBHKZ, BBU00.BUPKTO, #(lf)FROM WWC400.WEXFILE.BBU00 BBU00#(lf)WHERE (BBU00.BUFNR='01') AND (BBU00.BUBHKZ='D') AND (BBU00.BUPKTO='Kunde')")
in
Quelle

"BUPKTO" is defined as a parameter value like this:

let
Quelle = Excel.CurrentWorkbook(){[Name="Tabelle3"]}[Content],
#"Geänderter Typ" = Table.TransformColumnTypes(Quelle,{{"BUPKTO", type text}}),
BUPKTO = #"Geänderter Typ"{0}[BUPKTO]
in
BUPKTO

Is this working like this, or am I completely wrong...!?

Thx
Daniel

Return to “Power Query”

Who is online

Users browsing this forum: No registered users and 0 guests

cron