Using Clipboard

Queries, results and objects from the catalog can be copied to the Windows Clipboard by pressing [Ctrl+C]. The information copied to the Clipboard can then be copied into a variety of other software applications, depending on the type of output desired.

Depending on the currently focused control, the copy operation changes its source. For example, if you have selecting a cell in the grid control, pressing [CTRL+C] will copy the value of that cell to clipboard. Similarly, to copy a table name select the desired name in the Catalog Tree and press [CTRL+C]

 

Extended Copy - Code

WinSQL Professional allows you to copy SQL code into HTML or Rich Text format using the Extended Copy option in the Query window.  You can also convert code using the Convert to Code option.

The following topics describe these options.

Convert to Code

This option allows you to write SQL code and convert that code into a third-generation language, such as C-Sharp, Visual Basic, or Java.

Perform the following steps to convert SQL code:

1          Right-click the desired script in the Query window, and then click Extended Copy.

2          Click Convert to Code. The SQL2Code Wizard window displays:

3          Select the desired language in the Language drop-down list.

4          If desired, change the default variable name in the Variable Name field.

5          Click Copy to copy the text to the clipboard.

Copy to Rich Text

This option copies SQL code to the Windows Clipboard in Rich Text format, which allows you to paste SQL code to different applications, such as a word processing application that uses Rich Text format.

To copy SQL code into Rich Text format, right-click the desired script in the Query windows, click Extended Copy, and then choose Rich Text.

Copy to HTML

This option converts the SQL code into HTML, while retaining all syntax highlighting, and provides a convenient way of creating HTML documentation.

To copy SQL statements into HTML, right-click the desired script in the Query windows, click Extended Copy, and then choose HTML.

 

Extended Copy - Results

When query results are displayed in the Query window, you have the option to copy data from more than one cell.

To perform an extended copy, click in the results grid in the Query window, right-click, and then select the desired option.

 

 

Use Copy comma separated values if you need to use the copied data in a SQL query. For example:

-- Using comma separated values in a -- WHERE clause

select * from  dbo.Customer   c 

where  Id_no  in (43, 59, 71, 81)