4. Custom SQL
The "Custom SQL" section of Store Manager allows to operate your store database using the created SQL commands.
To launch this section open the Tool tab of Store Manager top menu and select [Custom SQL]:
The right pane of Custom SQL has three tabs: Edit, Results and Logs.
If you have generated SQL statement, contained in a separate file, you can download it by using the corresponding button on the toolbar:
To create a new SQL Query press the corresponding button and specify the new query name in the creation form. Click 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 the "Edit" tab. When your query is completed, do not forget to press [Save].
< - The [Execute SQL (F9)] button can be used to check the correctness of the specified query.
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 already existing SQL statement, press the [Rename] button and type the new "SQL Name."
Click the [OK] button to save changes.
[Delete] removes unused SQLs from the available list.
[SQL Help] 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 the [SQL Help] button and find among the folder list with the request functions the necessary one:
In our case, this is a
Functions - > String Functions - > CONCAT
In the right pane of the "SQL Help" window, the "Description" field contains information about this type of SQL query. There is also a link at which you can find more detailed information about CONCAT query. In the lower right pane, examples of CONCAT function application are submitted.
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.