Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
RehanPattni
New Member

One datasource Multiple Queries

Hi,

 

I have one OLEDB data source with multiple queries. How can I use the same data source for multiple queries

 

Ex.

 

Provider=SQLOLEDB.1;Initial Catalog=XXX;Data Source=YYY;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=RRRR;Tag with column collation when possible=False

 

Query 1-

 

Select DISTINCT b.account_name as Account, b.market_segment_id, b.account_type_id
from acnt a left join acnt b on a.parent_account_id = b.account_id
where a.is_active = 1 and a.account_type_id =1
UNION
Select a.account_name as Account, a.market_segment_id, a.account_type_id
from acnt a left join acnt b on a.parent_account_id = b.account_id
where a.is_active = 1 and a.account_type_id = 1 and b.account_name is NULL
Order by Account

 

Query 2-

 

Select * from XYZ where Accnt="RRR"

 

these are just sample queries 

 

The main question is how can I use same data source for multiple queries 

2 REPLIES 2
Greg_Deckler
Super User
Super User

I would think that you would just create multiple queries? I do this all the time to a single data source.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
RehanPattni
New Member

Hi,

 

I have one OLEDB data source with multiple queries. How can I use the same data source for multiple queries

 

Ex.

 

Provider=SQLOLEDB.1;Initial Catalog=XXX;Data Source=YYY;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=RRRR;Tag with column collation when possible=False

 

Query 1-

 

Select DISTINCT b.account_name as Account, b.market_segment_id, b.account_type_id
from acnt a left join acnt b on a.parent_account_id = b.account_id
where a.is_active = 1 and a.account_type_id =1
UNION
Select a.account_name as Account, a.market_segment_id, a.account_type_id
from acnt a left join acnt b on a.parent_account_id = b.account_id
where a.is_active = 1 and a.account_type_id = 1 and b.account_name is NULL
Order by Account

 

Query 2-

 

Select * from XYZ where Accnt="RRR"

 

these are just sample queries 

 

The main question is how can I use same data source for multiple queries 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.