SQL Server Management Studio Database Engine Query Editor Window
Use the Database Engine Query Editor to create and run Transact-SQL, XQuery, and sqlcmd scripts.
-
Type scripts in the Query Editor window.
-
To execute scripts, press F5; or click Execute on the toolbar; or on the Query menu, click Execute. If a part of the code is selected, only that part is executed. If no code is selected, all the code in the Query Editor is executed.
-
To obtain help with Transact-SQL syntax, select a keyword in Query Editor, and then click F1.
-
For dynamic help with Transact-SQL syntax, on the Help menu, click Dynamic Help. This opens the Dynamic Help component. With Dynamic Help, help topics appear in the Dynamic Help window when keywords are typed in the Query Editor.
-
The Query Editor supports IntelliSense functionality, such as word and parameter completion. For more information, see Using IntelliSense.
Note
Enabling IntelliSense for large Transact-SQL scripts can reduce the performance of slow computers. For information about how to limit the size of Transact-SQL scripts for which IntelliSense is enabled, see Options (Text Editor/Transact-SQL/IntelliSense).
-
The Query Editor provides the Transact-SQL debugger that you can use to help debug Transact-SQL scripts and statements. For more information, see Using the Transact-SQL Debugger.
-
Errors messages are displayed in the following areas:
-
In a Messages tab at the bottom of the window for errors that are returned by the SQL Server Database Engine.
-
In the Error List window for errors that are generated by IntelliSense. For more information, see Error List Window (Management Studio).
-
In the Output or Immediate windows for errors that are generated by the Transact-SQL debugger.
-
When the Database Engine Query Editor is open, the SQL Editor toolbar appears with the following buttons.
You can also add the SQL Editor toolbar by selecting the View menu, selecting Toolbars, and then selecting SQL Editor. If you add the SQL Editor toolbar when no Database Engine Query Editor windows are open, all the buttons are unavailable.
Managing Files with Encoding
http://msdn.microsoft.com/en-us/library/ms173518(SQL.100).aspx
> ANSI files allow only characters that are supported in the current code page, which limits international use.
In case of such symptoms, it could be resolved by using -f <codepage> command-line option via sqlcmd Utility.
e.g.
sqlcmd -Q "SELECT * FROM sys.messages WHERE language_id = 1041" -o out.txt -f 932
The other way to resolve is by outputting the file as UNICODE and then converting to SJIS.
- 11/1/2011
- RTF