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.
The right pane of Custom SQL has three tabs:
- edit, results and logs.
If you have the generated SQL statement, contained in a separate file, you can download it by using the corresponding button on the toolbar:
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.
The results will display on a same-named tab of this section:
You can check the logs tab if any errors occur during executing:
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.
Delete option helps to remove unused SQLs from the available list.
Help option ensures the provision of detailed information regarding formation of SQL queries by using the embedded templates.
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.
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.