Forum Stats

  • 3,872,251 Users
  • 2,266,411 Discussions
  • 7,911,109 Comments

Discussions

What is the syntax for connection an Oracle through a Power Excel Query

User_WICXR
User_WICXR Member Posts: 1 Green Ribbon

Hello,

Can someone help me in finding the correct syntax to connect with an oracle database with an Excel Power Query?

In my SQL the syntax is something like this below :

let

  ParamTable = Excel.CurrentWorkbook(){[Name="TableParam"]}[Content],

    birthYear = Record.Field(ParamTable{0},"Value"),

    firstName = Record.Field(ParamTable{1},"Value"),

  Source = Sql.Database("HOMESERVER\KOTOR", "AdventureWorksDW"),

  GoQuery = Value.NativeQuery(Source,

    "SELECT [FirstName],[LastName],[BirthDate]

    FROM [dbo].[DimEmployee]

    WHERE YEAR([BirthDate]) >= @BirthY AND [FirstName] LIKE @FirstN+'%'",

    [FirstN = firstName, BirthY = birthYear]

  )   

in

  GoQuery

Can you tell me also on which place the name of the oracle Database has to be placed and where the name of the table and maybe other Oracle fields or parameters have to be set.

The purpose is to each excel values as a parameter in a sql to interrogate an Oracle Database.

Thank You In Advance

My best regards

Marc.

Tagged: