Building SQL Expression Query
Feature Description
SQL Expression Query allows direct input of query statements to quickly build query expressions. It supports automatic keyword completion during expression construction.
This feature is designed for users with basic SQL knowledge.
Feature Entry
- Spatial Analysis tab->Query->SQL Query dropdown->SQL Expression Query
Steps
This section demonstrates using SQL Expression Query with land use data from sample data/SampleData/ExerciseData/LandUse/LandUse.udbx.
- Open the JSTB dataset from LandUse.udbx in the map.
- Click Spatial Analysis tab->Query->SQL Query dropdown->SQL Expression Query to open the dialog.
-
In the SQL Expression Query dialog toolbar, set the data source for query datasets to "LandUse" under Query Data Source.
- Input the query expression in SQL statement box: select * from JSTB where JSTB.DLMC ="Paddy fields". For expression syntax, refer to Building SQL Query Expressions. For function usage, see SQL Query Function Reference.
- Click the Query button in the toolbar (or press Ctrl+Enter) to execute. As shown below, results will display in both table and map. Syntax errors will show "Failed to query. Please check the SQL syntax." in the log.
Related Topics