SQL CTE code disappear

rebeccawilson100

New Member
Joined
Jun 23, 2016
Messages
7
Hello,

I am quite new to sql and am having some issues with a code i have written using microsoft query. I wrote 2 CTEs and it works great but once imported to Excel if i try and go back to the query section, the code has disappeared. I even tried a singular basic CTE and the same thing happens. I've been looking on google but have not found an answer or reason as to why it does this.

Any ideas?

Thanks

Rebecca
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hello,

I am quite new to sql and am having some issues with a code i have written using microsoft query. I wrote 2 CTEs and it works great but once imported to Excel if i try and go back to the query section, the code has disappeared. I even tried a singular basic CTE and the same thing happens. I've been looking on google but have not found an answer or reason as to why it does this.

Any ideas?

Thanks

Rebecca

How are you importing it as Text or as data from Microsoft Query

If its the latter (the best way) then the within the connection properties of the table (data ribbon) exported you can get to a tab called definition within which sits the command text (the sql) which can be edited via the edit query button which takes you back to the MS Query window.
 
Upvote 0
I think i am importing it as data. The way i am getting back to the sql it right click on the table -> table -> Edit query. I have used this process in the past for different queries and been able to go back to the sql code behind it. But as soon as I write a CTE i can't go back to the code.

Forgive me if i'm making really basic mistakes or talking jibberish.
 
Upvote 0

Forum statistics

Threads
1,215,024
Messages
6,122,729
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top