Data Lookup

The data lookup feature in WinSQL allows users to see the actual values in the tables when writing SQL queries. The value can appear automatically when WinSQL detects a WHERE clause in the query window.

Customizing Data Lookup

Data lookup features work great for small databases. However, it can be a real resource intensive task for large databases. Therefore, WinSQL provides several options to customize data lookup.

Modifying SQL query to fetch data

Whenever data is populated in the Intell-Tip window, WinSQL runs a query in the background. This query fetches necessary records for a particular column and display them on the screen. A SQL query can be associated with every column in the database. The steps below show how to associate a query with a column.
  • Start WinSQL, connect to your desired database and click the Catalog tab
  • Navigate to the desired column in the TreeView on the left hand side until you get to the column for which you wish to change the query
  • Double click the column
  • The following window is displayed
    DataLookup Configuration

Modifying display option

Besides modifying the SQL script, WinSQL allows you to change the options that change when Data Lookup is displayed. Click Edit/Options on the main menu to bring up the following window.

DataLookup Configuration

Enabled/Disable Database Lookup
Disable data lookup: Select this option if you wish to disable data lookup completely. You will not see the Data tab in the Intell-tip window.
Enable for every column: Select this option to enable data lookup for every column whose data type is any one of the following types.
  • Numeric
  • Date/time
  • Character (where length is less than 100)
Enable for columns that I choose: If this option is selected, you must specifically assign a SQL query to every column for which you wish to enable data lookup. To assign a SQL query, double click that column in the catalog window. (See above)

Number of records to display: Signifies the number of records to display in the Intell-Tip window. If the query returns more records, they will be ignored
Max length for character fields: Lookup will be enabled for fields where the column length is less than this value. For example, if there is a remarks field in a table and its size is 255, data lookup won't be enabled for this field. This value only applies to character types.
Max record count for a table: For large databases WinSQL may take a long time to fetch records from a table. Therefore, if you specify a value other than -1, WinSQL will only run data lookup queries for table having fewer number of rows than what you specify here.


Social Media

Powered by