cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Chanty4u Member
Member

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

Accepted Solutions
Super User
Super User

Re: RE: two query's on same databse

@Chanty4u

 

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.

8 REPLIES 8
Super User
Super User

Re: RE: two query's on same databse

Hi @Chanty4u

 

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?

Chanty4u Member
Member

Re: RE: two query's on same databse

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 ?

Super User
Super User

Re: RE: two query's on same databse

@Chanty4u

 

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

Chanty4u Member
Member

Re: RE: two query's on same databse

so how to differenciate two queries there?

 

 

Super User
Super User

Re: RE: two query's on same databse

@Chanty4u

 

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.

 

Chanty4u Member
Member

Re: RE: two query's on same databse

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?

Super User
Super User

Re: RE: two query's on same databse

@Chanty4u

 

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.

Chanty4u Member
Member

Re: RE: two query's on same databse

this quite simple that earlier Smiley Happy

 

thank you so much it worked  !!!