In SSMS, how do I change a SQL query window's tab name? - sql-server

I want to know how to change the tab name of a SQL query window:
Instead of SQLQuery8.sql…Registry(sa(51)), I would like to have a custom caption.
If the query window has a very title, I can only open 3 windows at a time. I want to open more than 10 windows. So I need to change the query window's name to something very short, something like Q1, Q2, etc.
How can I change this?

In SSMS, go to Tools > Options > Text Editor > Editor Tab and Status Bar.
You can manage some options of tab text, as shown in the picture below.
(for example don't include db name, file name, login name and/or server name).

My solution when I've got multiple tabs open is to save the file (Ctrl+S) and then renaming it to the table name—or whatever it needs to be to make the query recognisable at a glance.
Go into Tools > Options > Text Editor > Editor Tab and Status bar, and set all tab text to false except for Include file name (set this to True).
Now, when I next execute the query, the Tab text presents the new filename.

Related

Azure Data Studio: Save As CSV

In Azure Data Studio, after getting my results I'm clicking on the "Save as CSV" icon and nothing appears to be happening. How do I name the file and where will it be placed? I'm expecting to see a Save As.. dialog.
First, do a select statement.
Then a new notebook will appear. On the right margin, these icons as shown below will appear. Use them.
You can use the first icon to save the result as CSV, the second to save the results as excel file, the third will save the result a JSON file and other will save the result as an XML file
Apparently, you have to click on the blue arrow at the upper left of the icon to get the "Save as" dialog. Not very intuitive and user friendly and not documented that I can tell.

Open XQuery panel in BaseX

I have tried many times to open the XQuery panel on BaseX. I've searched just about anything on the GUI opened any panel that could be opened and searched throughout the documentation of BaseX, no go.
EDIT
When I go to View > Editor I do not get the XQuery panel I get this one:
The query editor is hidden under "View" -> "Editor", or using the hotkey Ctrl+E (on OS X, using Cmd instead).
Edit: In the updated screenshot, the query editor is already visible. The "XQuery" view was renamed some time ago, when the editor was enhanced. Just press the "+" button in the tab view to open a new tab to write XQuery code.

how to screen count in sql server

in my sql server i am able to open three window at a time.. in Google chrome i can open lot of window.i f i open new window automatically decrees the size of rest of all window.like that i want to sett my sql server.now only three window is showing my sq l server. if i open new window i want to show that in sql server(but tab size should decrees),is there any setting for that?
if any one know how to do that.please help me to find out..
one short answer is NO
but you can set options for what to display in tabs text so tabs will be shorter and you will have more tabs open. to set this option you can go to
click Tools >> Options >> Text Editor >> Editor Tab and Status Bar.
Check out the Tab Text options
You can uncheck the database name, login name, and server name because those are shown in the status bar anyway. Then, if you wanna get fancy, change the status bar location to Top – it’s right above the Tab Text options
Ref: Fixing SQL Server Management Studio’s Tab Text

Powershell: How to open a file from a separate window

I'm using PowerShell for about a week now. I am able to open a specific URL and fill in my username and password automatically. I can also navigate to a certain page where multiple files can be found to download.
I use the following command to select a certain file to download:
$ie.navigate2('http://www.example.com/resource.aspx?ResourceID=GetDocStoreFile&EntryID=1234')
What happens next is that a second window will open, named "file download". There are three buttons: open, save and close.
I don't want to press the "open" button manually, but would like the script to do that for me and then goes back to the original window to select another file. Any suggestions?
If you use a download URL, I don't think you can interact directly with IE using the COM object, because there's no document. Once the dialog box opens, all of the object's properties become null. You can use the method I posted here: How to perform keystroke inside powershell? AppActivate will work to activate a dialog box by title.
The % represents the the ALT key, so if the underlined letter of the button you want to click is O, you'd invoke SendKeys like this:
$wshell.SendKeys('%O')

Display memo fields in VFP

How to display the content of memo fields with select command?
If I have a table (vendors) with the following fields: id_vendor C(10),address M and I want to display all the content with "select * from vendors" I receive only the type of field but not the content.
If you are viewing the results in a browse window (which is what executing the SQL will show), then ctrl+pgdown in the field (where it is showing "Memo") will display the entire contents in a new window.
The SQL did retrieve the entire contents, which can be confirmed by in the command windows entering
? [fieldname]
And you will see the contents that way also.
Which language are you using or what it your output audience... if within VFP, use an EDIT field to allow for multiple row content to be shown. In a simple "text box" field, it will only show "memo" as you indicate. Otherwise, as Swordblaster indicated ctrl+pgdown or even double-clicking SHOULD open it, but that would throw up an uncontrolled "window" for you vs a controlled "edit box" control which you can specifically place in your window as needed.
Double click Memo and the contents are displayed in a new window.

Resources