Tools‎ > ‎

4. Custom SQL

fmCustomSqls
fmStringDialog
fmCustomSqlInsertParamDialog
fmCustomSqlFillParamDialog
fmMySQLHelp

Custom SQL allows to operate your store database using the created SQL commands.

To launch this section open Tool tab of Store Manager top menu.

Custom SQL section


The right pane of Custom SQL has three tabs:

- edit, results and logs

Custom SQL section


If you have the generated SQL statement, contained in a separate file, you can download it by using the corresponding button on the toolbar:

Load query from file


To create the New SQL Query press the appropriate icon and in the creation form specify the new query name. Click on the OK button to save your entries. Then you can launch the Visual Query Builder to facilitate the queries

creation or manually set the query in the top area of 'Edit' tab.  When your query is completed do not forget to press 'Save' button.

Run Visual query Builder


The 'Execute SQL (F9)' option can be used to check the correctness of the specified query - Execute SQL button

The results will display on a same-named tab of this section:

Results tab


You can check the logs tab if any errors occur during executing:

Logs tab


To rename the already existing SQL statement - press the 'Rename' button and type the new name of the SQL. To recent changes take effect click on the 'OK' button.

Rename SQL


Delete option helps to remove unused SQLs from the available list.

Delete button


Help option ensures the provision of detailed information regarding formation of SQL queries by using the embedded templates.

SQL Help button


For example, you need to create a query by combining certain strings of database. To do this, you should use a CONCAT function- click Help button and find among the folder list with the request functions the necessary one:

 in our case this is a 'Functions'->'String Functions' folder - > CONCAT file. In the right pane of the 'SQL Help' window in the description field contains the information about this type of SQL query and is served link at which

you can find more detailed information about CONCAT query. In the lower right pane are submitted examples of CONCAT function application. 

CONCAT function

This will help you to compose a correct SQL request. To verify the query press the corresponding button in the "Custom SQL" top toolbar that will launch the check editor.

You can link the created SQL query to the products of the store database or select simple type from the drop-down.

Linked to... button




Comments