|
Assign the same value 'New' to all records in the field 'Category' of the table 'Clients' |
Open the table and go to Data page. Make sure the Allow Edit button is pressed. Right-click the corresponding column and choose Batch Change Field Values. Type the value and click OK.
Create new SQL window, go to Edit page and type the SQL text:
UPDATE clients
SET category = 'New'
Click Execute Query button or press F9.
See also
Batch Changing Field Values
Working with SQL Queries
|
The same as the previous, but change only records where value in field 'Debt' is greater than 20 |
Open the table and go to Data page. Make sure the Allow Edit button is pressed. Type the filter condition (above the table grid):
Debt>20
Press ENTER or click Apply Filter button. Then do the same things as in the previous example.
Create new SQL window, go to Edit page and type the SQL text:
UPDATE clients
SET category = 'New'
WHERE debt>20
Click Execute Query button or press F9.
See also
Batch Changing Field Values
Working with SQL Queries
Filtering Data
|
Change all first symbols in all text fields of Animals table to upper case |
Open the table and go to Data page. Make sure the Allow Edit button is pressed. Choose Tools | Batch Operations with Text Fields.... Check All in the Fields area and First to UPPER Case in the Functions area. Select other desired options and click OK.
See also
Batch Operations with Text Fields
|
|
Export data from a dBase (DBF) table to a new Paradox (DB) table |
Open the DBF table, go to Data page and click Export Data button. Go to Database tab. Click Select a Database button and select destination folder for the new table; from driver list, select Paradox; click OK. Specify table name for the new table and other desired export options; for export mode, choose Replace+Insert. Click Next. Specify field mappings between old and new tables. Click Export. A new table will be created.
See also
Exporting Data
|
Export data to JSON |
Open the table (for example, customer.dbf from Examples folder) and go to Data page.
Click Export data button. Here, two ways are possible.
Use JSON target format, which already defined in the application:
In the Export Data window, go to the JSON tab and specify the target filename. Specify needed export options (make sure to choose correct export mode). Click Next. Specify source-to-target table mappings. Click Export button.
Use custom target format. It requires more effort from the user, but gives an ability to use non-standard approaches.
In the Export Data window, go to the Custom tab and specify the target filename.
In the Expression field, type the expression like this:
'{' +
'"ID":' + to_string(dataset_field_val(1, 'ID')) + ', ' +
'"FIRSTNAME": "' + dataset_field_val(1, 'FIRSTNAME') + '", ' +
'"LASTNAME": "' + dataset_field_val(1, 'LASTNAME') + '", ' +
'"CITY": "' + dataset_field_val(1, 'CITY') + '", ' +
'"COUNTRY": "' + dataset_field_val(1, 'COUNTRY') + '"' +
'}'
Click Export button.
See also
Exporting Data
|
Create a new table, which must consist of fields 'Name' and 'Street' from table 'Friends' |
Open Friends table. If it consists of two foregoing fields only, then all you should do is to export data as in the previous example. Otherwise (if the table consists of three or more fields) create new SQL window, go to Edit page and type the SQL text:
SELECT name, street
FROM friends
Click Execute Query button or press F9. The result data will be shown on Result page. Export it to the new table as in the previous example.
See also
Exporting Data
Working with SQL Queries
|
Copy selected tables to another database |
- Open the source database and its table list.
- Right-click the table list and choose Multiple Selection menu.
- Select needed tables and click Export button.
- Go to Database page and select the destination database. Choose needed export options.
- Click Next and specify source-to-target table mappings.
- Click Export.
See also
Exporting Data
|
Migrate several tables from PostgreSQL to SQL Server |
- Register the source and the destination databases. It is recommended to use FD interface in both cases.
- Open the source database.
- Go to the Tables tab to the left. Right-click the table list and choose Multiple Selection.
- Select the tables to export.
- Click Export button.
- Go to the Database tab. From the list of registered databases, select the destination database. Specify needed export options (make sure to choose correct export mode).
- Click Next and specify the source-to-target table mappings.
- Click Export.
In case of performance problems, try different combinations of Memory saving options. For large tables, use this recommendations.
See also
Exporting Data
|
|
Import data of first two records from 'Country' table and fields 'Capital' and 'Area' into the 'City' table and fields 'Name' and 'Area', accordingly (from the same database) |
Open the 'City' table and go to Data page. Make sure the Allow Edit button is pressed. Right-click the 'Country' table in the table list and choose Import Data From Country. Export dialog will appear. Make sure the source table specified correctly, and click Next. Choose Append export mode. Turn Limit the record count to option on and type '2' in the corresponding field. Click Next. Match the field Capital' from the 'Country' table to the field 'Name' from the 'City' table and the field 'Area' to the 'Area'. Other fields from the 'Country' table must not match to any field from the 'City' table. Click OK.
See also
Importing Data
|
|
Delete records, where value of field 'Debt' is less than 10 |
Open the table and go to Data page. Make sure the Allow Edit button is pressed. Click Select Records button, select records to delete and click Delete Record button.
Open the table and go to Data page. Make sure the Allow Edit button is pressed. Type the filter condition (right above the table grid):
Debt<10
Press ENTER or click Apply Filter button. Click Select Records button, select all records and click Delete Record button.
Create new SQL window, go to Edit page and type the SQL text:
DELETE FROM clients
WHERE debt<10
Click Execute Query button or press F9.
See also
Working with Tables
Working with SQL Queries
Filtering Data
|
|
Print a table or query |
Open a table or query. For table, go to Data page; for query, go to Result page.
Choose Tools | Print Table. Select needed options and click OK. The table will be printed as it appears on the screen. Note, that hidden columns will not be printed.
This soultion is available in Database Tour Pro only.
Click Report Builder button. Report template will be shown. Customize it if you wish. Click Preview. In Preview window, click Print, select needed options and click OK.
See also
Printing Data
Reports Overview
|
Print the first and the third column from a table |
Open a table or query. For table, go to Data page; for query, go to Result page.
Hide all columns, except first and third columns (use right mouse button and floating menu to do this). Choose Tools | Print Table menu, then click OK.
This solution is available in Database Tour Pro only.
Click Report Builder button. In report template, select and delete unwanted column objects. Customize (if necessary) other objects. Click Preview. In Preview window, click Print, select needed options and click OK.
See also
Printing Data
Reports Overview
|
Print a table with totals for all numeric fields (Database Tour Pro only) |
Open a table or query. For table, go to Data page; for query, go to Result page. Click Report Builder button. Mark with check Totals band in Report Tree window to make it visible. Place Expression objects on it under first numeric column. Call expression editor (button '...' in Object Inspector window). In the editor, select SUM from the function list and desired field from the field list and click Add button. Then click OK. Repeat this procedure for all columns, to which you wish to add expressions.
Click Preview. In Preview window, click Print and then click OK.
See also
Report Expressions
Reports Overview
|
Create a report with grouping records (Database Tour Pro only) |
Open a table or query. For table, go to Data page; for query, go to Result page. To group records by some field(s), you should sort the table by these field(s).
Click Report Builder button. In Report Tree, select Report to see the report properties. Specify grouping expression.
Check grouping bands in report tree to make them visible. Place desired objects on them.
Click Preview. In Preview window, click Print and click OK.
Note: There are examples of report templates with grouping in the Example folder of the application (for example, groups.dtt).
See also
Reports Overview
|
Automate the following actions: Open 'WorkData' ODBC data source, 'City' table from this database, load report template from file C:\My templates\city.dtt and show the report preview (Database Tour Pro only) |
Create a text file and give it .bat extension. Open it for editing and type the following line of text (use a real path to Database Tour Pro instead of "C:\Program Files\...\dbtour.exe"):
"C:\Program Files\...\dbtour.exe" /OpenDB /DBInterface=ado /DBKind=DSN /DB=WorkData /TableName=City "/ReportTemplateFile=C:\My templates\city.dtt" /ReportPreview
Save the file. Now, if you double-click this file, all the foregoing actions will be performed automatically. It is very useful, for example, when you need to perform daily reports.
See also
Command Line Usage
|
|
Find the 'Bill' word in field 'Name' |
Open the table and go to Data page. Right-click the Name column and choose Find. Select desired options and click OK.
See also
Searching and Replacing Text
|
Replace all the 'Cat' words in the fields Animal and Description with the 'Mouse' word |
Open the table and go to Data page. Make sure the Allow Edit button is pressed. Right-click the Name column and choose Replace. Select desired options and click OK. Repeat this for another column.
Open the table and go to Data page. Make sure the Allow Edit button is pressed. Right-click each unnecessary column and choose Hide Column. Choose Search | Replace. Type Cat in the upper edit window and Mouse in the lower one. Select All in the Fields area. Select (if you wish) other options and click OK.
See also
Searching and Replacing Text
|
|
Get sum of numeric field 'Price' from 'Goods' table |
Open the table and go to Data page. Choose Tools | Arithmetic Functions.... Select the function, and then select the field (column) from drop-down list.
Create new SQL window, go to Edit page and type the SQL text:
SELECT sum(price)
FROM goods
Click Execute Query button or press F9.
See also
Arithmetic Functions
Working with SQL Queries
|
|
Specify custom titles for data grid columns |
Open the table and go to Data page. Right-click the needed column and choose Column Properties | Title.... Specify the title and click OK. Physical field name remains unchanged. There is an ability to change other visual properties of table columns, save the column definitions to file and load them for this table at a later time.
See also
Data View
|
Specify the column pick list, all records from which must be extracted from a certain database field |
Open the table, from which the pick list data should be copied, and go to Data page. Right-click the column, from which the data should be copied and choose Copy | Column.
Then open the table, where the pick list should be created, and go to Data page. Right-click the needed column and choose Column Properties | Pick List.... Click Paste from Clipboard button. Modify the list (if it is needed) and click OK.
See also
Data View
|
|
Copy opened table or query to clipboard |
Open a table or query. For table, go to Data page; for query, go to Result page.
Then choose Tools | Copy | Full Table or click Copy Data to Clipboard button and choose Full Table from drop-down menu.
See also
Using Clipboard
Copying Data to Clipboard
|
Paste data from clipboard into an opened table |
Open the table and go to Data page. Make sure the Allow Edit button is pressed.
Select a field, from which you wish to paste data, and press CTRL+ALT+V.
See also
Using Clipboard
|
|
Encrypt all files from C:\My Templates folder (Database Tour Pro only) |
Create a text file and give it .bat extension. Open it for editing and type the following line of text (use a real path to Database Tour Pro instead of "C:\Program Files\...\dbtour.exe"):
"C:\Program Files\...\dbtour.exe" /encrypt /silent "/SrcFile=C:\My Templates\city.dtt" "/TrgFile=C:\Encrypted\city1.eee" /Password=MyPassword
Duplicate this line for every file you wish to encrypt, and adapt it accordingly.
Save the file and run it to encrypt all selected files.
See also
Command Line Usage
Encrypting / Decrypting Files
|