azuredatastudio icon indicating copy to clipboard operation
azuredatastudio copied to clipboard

Support Results to Text

Open CobusKruger opened this issue 7 years ago • 60 comments

When executing a query, the results are shown in grid form. Sometimes it is more useful to have it as text, using spaces or commas. This is a configurable option in SSMS, which is great.

  • SQL Operations Studio Version: Preview 1

Steps to Reproduce: Execute something like:

execute sp_helptext MyStoredProcHere

The results are given in the grid, but it would clearly make more sense as text.

CobusKruger avatar Nov 16 '17 10:11 CobusKruger

dupe #86

anthonydresser avatar Oct 19 '18 18:10 anthonydresser

@anthonydresser - is this really a dupe? There are 2 issues:

  • Displaying results as text just like in SSMS. This issue tracks that.
  • outputting to file as text. #86 covers that.

I think this needs reopening (especially since I'm directing a twitter user in https://twitter.com/josephcooney/status/1059975197707649024 to track the "view result as text" issue), so that users can find this issue and see when it's actually fixed independent of the other option.

kevcunnane avatar Nov 07 '18 01:11 kevcunnane

sp_helptext is exactly the use-case I was thinking of. Thanks @kevcunnane for re-opening.

josephcooney avatar Nov 07 '18 02:11 josephcooney

This is one of the show-stopper gaps preventing me from including ADS in my normal daily workflow. Like others, I use text to grab sp_helptext results. But there are other use cases. For example, to post results into a code block (say, on GitHub or in Slack), it is very easy to do some light editing, such as using rectangular selections to change column width, before pasting the text into the app in question. I miss "results to text" every single time I use ADS. Even though it is faster to load, more lightweight, and so forth, there are just a few things that make it feel broken to me, and this one is near the top of the list.

sql-sith avatar Mar 06 '21 00:03 sql-sith

Logging additional request for this functionality after the ADS 1.35 release. This was logged from a community member here: https://feedback.azure.com/d365community/idea/a49e5d4e-5fb1-ec11-a81c-0022484ee92d

erinstellato-ms avatar Apr 08 '22 18:04 erinstellato-ms

Guys this is very simple and key feature, what the hell such a basic functionality is still not available

yahorsi avatar Jan 15 '23 23:01 yahorsi

I am also supporting the request for this functionality, especially for the "sp_helptext" use-case. Please give an update on the progress being made to include this feature.

ubbrownjr avatar Feb 09 '23 13:02 ubbrownjr

@yahorsi and @ubbrownjr Your support for this request is noted. Understand that while functionality may seem "simple", the implementation is not always such. We have a roadmap that includes improvements to scripting support, and this request aligns with that workstream. Know this is on our radar; there is a lot we want to do, and we are doing our best to get as much as we can completed as fast as we can. Thanks.

erinstellato-ms avatar Feb 09 '23 14:02 erinstellato-ms

Just FYI i without it you cannot do one of most important thing for optimising queries - EXPLAIN ANALYZE

yahorsi avatar Feb 09 '23 14:02 yahorsi

@yahorsi Are you stating that you need to see the full text of the object in order to optimize it, or need to be able to view the query plan for the query in order to optimize? (the latter functionality already exists).

erinstellato-ms avatar Feb 09 '23 15:02 erinstellato-ms

Erin, we use stored procedures that generate dynamic sql. A LOT. Many times we have to test the sql generated and returning results to text is the best way for us to grab the result. Thank you for prioritizing this. Mala

dmaloo avatar Apr 04 '23 18:04 dmaloo

I recently started using Azure Data Studio, and I really like lots of the functionality, but without results to text it's missing a key feature for my workflow. This is really a critical issue if this tool is going to be more widely adopted.

I just want to add the small weight of my vote to push this issue up! Thanks ADS team!

hucksy avatar May 02 '23 17:05 hucksy

6 years later and this feature still hasn't been added to ADS.

chris-tietgen avatar May 23 '23 13:05 chris-tietgen

I want this too!

barryseymour avatar May 31 '23 19:05 barryseymour

Come on, friends... I am a huge fan of ADS since it started, but without something like the SSMS "Output as Text" it's impossible for us to migrate all we have from SSMS to ADS. We use it in procedures and long-running queries to output dynamic code that will be used elsewhere.

I'm pretty sure that LOTS of DBAs, Developers, IT Admins and all sorts of creative (and ingenious) guys and girls worldwide used it, a lot. I have been working professionally with MS SQL Server for over 25 years now (my MCSE certification is dated February 1998), I already saw many things on the wild in my developer life, and this is something that the users really need. Believe me.

Please, consider a way to give a solution for this. Let us finally migrate from SSMS to ADS and enjoy its awesome features.

fabiofer-br avatar Jun 06 '23 15:06 fabiofer-br

@fabiofer-br So...if we added "output as text" for the query editor, then everything you need would exist in ADS, and you could use that for 100% of your daily tasks?

I don't discount the value of this functionality - I've used it myself multiple times in SSMS! Just making sure I understand that if I asked you what is missing from SSMS that you absolutely MUST have in ADS, this would be the highest priority? Thanks!

erinstellato-ms avatar Jun 06 '23 17:06 erinstellato-ms

@erinstellato-ms Lack of results to text closes many many super basic scenarios, it's absolute must-have functionality and lack of it is just embarrassing

yahorsi avatar Jun 06 '23 20:06 yahorsi

@erinstellato-ms This is the only reason why I still have to open up SQL Server management tool regularly, namely for the text output. I always have to breathe a deep sigh when I have to open SSMS. We can do everything else in Azure Data Studio and it's a much nicer piece of software. We're already discussing all kind of workarounds so we don't need the text output any more, but it would make life a lot easier if that would be possible in ADS instead. I don't see any other reason why I would ever use SSMS again.

ststo avatar Jun 06 '23 20:06 ststo

@ststo Thank you for providing the additional context. I get that workarounds are annoying.

@yahorsi We acknowledge that ADS is not (yet) a complete product - but hopefully the community has seen that we are actively working on adding new functionality and addressing issues related to reliability.

In talking with engineering, we are going to review open issues for both result sets and query editor and see what we can tackle in the coming months. I mentioned this request specifically and I believe it's something we can pick up. I do not have a time frame (e.g. it's not going to happen next week), but I want you to know that we hear the feedback, and we are going to try to get this done. Please stay patient and look for updates in the release notes and here. Things typically show up in the Insider builds first, in case that's an option, and help with validating the experience once we've added it is always appreciated.

Thanks for taking time to share your perspective, we'll keep you posted.

erinstellato-ms avatar Jun 06 '23 21:06 erinstellato-ms

@erinstellato-ms Thanks a lot for your message! 💯

My answer is YES 👍, in my specific situation, considering the scenario at my current job. Today, It's the main point that is blocking us to use only ADS easily. I'd like to note that we are a development team, so as developers our needs are different from the needs of the operations, infrastructure, or database administration teams. For us, generally the most relevant and priority points tend to be the ability to manipulate the data itself, the processing of that data, database objects, properties and so on.

ADS today has much more developer-related features and tools than SSMS (again, in our case), so ADS is a great tool for us. Server and environment administration features (which SSMS has a lot) and their related tools are not quite useful for us. Typically, developers don't even have the access rights to use them, in today's real-world scenarios.

Hope this helps! Thanks!

@fabiofer-br So...if we added "output as text" for the query editor, then everything you need would exist in ADS, and you could use that for 100% of your daily tasks?

I don't discount the value of this functionality - I've used it myself multiple times in SSMS! Just making sure I understand that if I asked you what is missing from SSMS that you absolutely MUST have in ADS, this would be the highest priority? Thanks!

fabiofer-br avatar Jun 07 '23 13:06 fabiofer-br

@fabiofer-br Thank you for the feedback, this is helpful! Is there anything, in your scenario on your development team, that you feel is missing from ADS and blocking you from using? Specifically, if I said, "in addition to results to text, what are two other must have things you need that ADS doesn't support, what would your answer be?"

Thanks so much, really appreciate your feedback!

erinstellato-ms avatar Jun 07 '23 14:06 erinstellato-ms

Sometimes I write SQL that generates more code; maybe SQL, maybe PowerShell. In those cases, I need the output to go to a text file so I can easily save it to another file. ADS is more of a PITA in these cases than it's worth, so I have to switch to SSMS.

barryseymour avatar Jun 07 '23 23:06 barryseymour

Sometimes I write SQL that generates more code; maybe SQL, maybe PowerShell. In those cases, I need the output to go to a text file so I can easily save it to another file. ADS is more of a PITA in these cases than it's worth, so I have to switch to SSMS.

@barryseymour Thank you for explaining that scenario, it's a good one to understand, I've used it myself.

erinstellato-ms avatar Jun 08 '23 13:06 erinstellato-ms

One more super basic scenario, for the MySql or PostgreSql, execution plan ius returned as text, after running EXPLAIN statement, so, currently, on the ADS, it's impossible to see any execution plan for MySql or PostgreSql

yahorsi avatar Jun 09 '23 00:06 yahorsi

I too am missing results to text. I have a keyboard query shortcut that does sp_helptext on the selected text (an object name in this case). In SSMS I'd hit Ctrl+T to switch to results to text so I can see an object definition quickly.

Another feature missing relates to the grid results... I miss being able to drag-drop values from the results grid into the editor like I can in SSMS.

I like a lot about ADS but without these 2 features I'm constantly switching back to SSMS because these features make me more productive.

Thanks for all the awesome work done so far!

danpeps avatar Jun 09 '23 07:06 danpeps

Here's one that would be helpful that I'd expect to come with text output: Ability to find text within the results, including column headers. Would also be helpful in grid results.

tlunsfordCXP avatar Jul 13 '23 18:07 tlunsfordCXP

Here's one that would be helpful that I'd expect to come with text output: Ability to find text within the results, including column headers. Would also be helpful in grid results.

@tlunsfordCXP Making sure I understand your request here - you're asking for search capability in the results (whether text or grid), correct?

erinstellato-ms avatar Aug 05 '23 00:08 erinstellato-ms

Here's one that would be helpful that I'd expect to come with text output: Ability to find text within the results, including column headers. Would also be helpful in grid results.

@tlunsfordCXP Making sure I understand your request here - you're asking for search capability in the results (whether text or grid), correct?

Exactly.

GaTechThomas avatar Aug 05 '23 13:08 GaTechThomas

@GaTechThomas Can you please add your comment and upvote this issue (https://github.com/microsoft/azuredatastudio/issues/23427) as that is more appropriate to your request? Thanks!

erinstellato-ms avatar Aug 07 '23 13:08 erinstellato-ms

Ugh I just realized that I'm bouncing between ID's. @erinstellato-ms - thank you, I just upvoted and commented in #23427.

tlunsfordCXP avatar Aug 07 '23 17:08 tlunsfordCXP