• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Join Queries that collect variables from Excel and will be used in a sql to gather data from an Oracle Database in one query.|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Join Queries that collect variables from Excel and will be used in a sql to gather data from an Oracle Database in one query.|Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryJoin Queries that collect variables…
sp_PrintTopic sp_TopicIcon
Join Queries that collect variables from Excel and will be used in a sql to gather data from an Oracle Database in one query.
Avatar
Marc Bergmans
Member
Members
Level 0
Forum Posts: 24
Member Since:
February 19, 2021
sp_UserOfflineSmall Offline
1
May 16, 2021 - 5:28 am
sp_Permalink sp_Print

Hello,

I made several queries that convert an excel value into a variable that can be used in a power excel query that uses a sql-program to collect data from an oracle database.

After changing the value in Excel i need to refresh all the queries separately and that i want to change.
So I want to make one query of the individual queries (that convert the excel values into parameters) that i have at this moment.

In attachment you can find a printscreen of the queries that convert the value in to a parameter and the sheet where you can select the value which will be converted into a parameter.
Also in attachment the syntax of each query which i want to join in one query. The syntax of these queries you can also found below here.

Can someone tell me i this is possible because each individual query results in a table in excel with the wanted parameter value and if it is possible can someone make one query of these several queries so that i know how i can do this for the future.

Current
let
Source = Excel.CurrentWorkbook(){[Name="Cur"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{ {"CurPart", type text}}),
CurName = #"Changed Type"{0}[CurPart]
in
CurName

Previous
let
Source = Excel.CurrentWorkbook(){[Name="Prev"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{ {"PrevPart", type text}}),
PrevName = #"Changed Type"{0}[PrevPart]
in
PrevName

SubCon1
let
Source = Excel.CurrentWorkbook(){[Name="Suba"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{ {"SubConTit1", type text}}),
SubNameA = #"Changed Type"{0}[SubConTit1]
in
SubNameA

SubCon2
let
Source = Excel.CurrentWorkbook(){[Name="Subb"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{ {"SubConTit2", type text}}),
SubNameB = #"Changed Type"{0}[SubConTit2]
in
SubNameB

Thank You In Advance

My Best RegardsOverview-Variables-Excel-and-Queries-2.pngImage Enlarger

Query-Current-1.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage Overview-Variables-Excel-and-Queries-2.png (190 KB)
  • sp_PlupImage Query-Current-1.png (18 KB)
Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1807
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
May 18, 2021 - 4:04 pm
sp_Permalink sp_Print sp_EditHistory

Why using separate tables for each parameter?
You can put all parameters in a single table, see image attached.

1-5.jpgImage Enlarger

You will then be able to use any parameter you need:
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],

Cur=Source{0}[CurPart],
Prev=Source{0}[PrevPart],

Or, don't create a query for each parameter.
You can just refer to that parameter directly in the query you need:
Cur = Text.From(Excel.CurrentWorkbook(){[Name="Cur"]}[Content]{0}[CurPart]),
SubNameB = Text.From(Excel.CurrentWorkbook(){[Name="Subb"]}[Content]{0}[SubConTit2]),

sp_PlupAttachments Attachments
  • sp_PlupImage 1-5.jpg (30 KB)
sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Lionel Baijot, Jack Brett, Ben Hughes
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Hayden Hao
Angela chen
Sean Moore
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Forum Stats:
Groups: 3
Forums: 24
Topics: 6211
Posts: 27238

 

Member Stats:
Guest Posters: 49
Members: 31891
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.