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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

RE: two query's on same databse

Hi @AIB,

 

i have two seperate query's    two execute.

 

so i have done below steps.

 

first  get data selected  sql server  then entered the servername and   advanced  entered  first query. 

then username password   .query is executed and table is created for that single query,

 

 

so  now i have other query   - where i need to run the second query?

 

again i need to go get data -select sql server -enter credentials?     is there any other options to execute mutiple query's?

please guide me

Best

Chanty

1 ACCEPTED SOLUTION

@Anonymous

 

I don't think so. You could, after creating the first query in the query editor:

1. Duplicate it

2. In the duplicated query: go to the first Step: 'Source' and open it on the configuration sign on the right, that symbol looking like a tooth wheel

3. Enter your SQL query 2 there.

 

Maybe it will be a bit faster, but not by much.

View solution in original post

8 REPLIES 8
AlB
Super User
Super User

Hi @Anonymous

 

Can you show how  you entered the first query that you say is working fine?

Paste here the text you've used and explain where?

Anonymous
Not applicable

Ok,

query 1

select * from  vw.region ;  

 

query2 

select * from  vw.product;

 

so   fresh Power bi application i opened. 

 

step1:   get data

step2:   sql server databse 

step3:  enter servername 

step4:  advanced

step5  :  select * from  vw.region ;  

step6:  username ,password.   

 

step7   Query 1    i have 4,5 columns its coming perfectly.

 

 

Now my question i have second query  if i want to execute  seond query do i need to follow above same steps or anyother way ?

@Anonymous

 

Can you not enter all the queries at once in the query editor? Under advanced option in the menu where you connect to the SQL server

medium.png

Anonymous
Not applicable

so how to differenciate two queries there?

 

 

@Anonymous

 

What are the two queries that you want to carry out? Can you copy them here?

 

In any case, I think it might be a good option to do this in the query editor. There you can also, under Home,  select "New Source"-->SQL Server and you'll get the same menu as shown above with Server, Database, etc.

You can enter your query under 'Advanced Options' as we've seen and then that query will be assigned to a table. You can follow the same procedure with your query 2 and it will be assigned to another table.

 

Anonymous
Not applicable

exactly im doing the same.  but every time i need to follow all steps right? 

 

to avoid this  is there any other option to  click new query and enter that and execute?

@Anonymous

 

I don't think so. You could, after creating the first query in the query editor:

1. Duplicate it

2. In the duplicated query: go to the first Step: 'Source' and open it on the configuration sign on the right, that symbol looking like a tooth wheel

3. Enter your SQL query 2 there.

 

Maybe it will be a bit faster, but not by much.

Anonymous
Not applicable

this quite simple that earlier 🙂

 

thank you so much it worked  !!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.