...
SQL
...
strings
...
enable
...
the
...
application
...
of
...
advanced
...
filters
...
within
...
...
.
...
The
...
SQL
...
string
...
entered
...
into
...
SAP2000
...
corresponds
...
to
...
the
...
portion
...
of
...
the
...
full
...
SQL
...
Select
...
Statement
...
which
...
follows
...
the
...
...
On this page:
Table of Contents
Examples
Example 1 - Verification Example 1-024
To demonstrate, advanced filtering will be applied, using SQL strings, to the Joint Coordinates table of Verification Example 1-024 as follows:
Report 1 - select joints with X coordinate greater than 1
Report 1 selects all joints where the X coordinate is greater than 0, then sorts the data in order of XorR, Y, and Z coordinates using the SQL string which follows:
Code Block | ||
---|---|---|
| ||
Clause{new-tab-link}. To demonstrate, advanced filtering will be applied, using SQL strings, to the Joint Coordinates table of Verification Example 1-024 as follows: h1. Report 1 *Report 1* selects all [joints|kb:Joint] where the X coordinate is greater than 1.0, then organizes the data in order of XorR, Y, and Z coordinates using the SQL string which follows: {code} XorR > 0 ORDER BY XorR, Y, Z {code} |
The
...
application
...
of
...
this
...
advanced
...
filter
...
SQL
...
string
...
is
...
shown
...
in
...
Figure 1:
Figure 1 - Advanced filter SQL string
Data is organized accordingly in the Joint Coordinates table, as shown in Figure 2:
Figure 2 - Joint Coordinates table
Report 2 - select joints with z coordinate greater than 12 and smaller than 14
Report 2 selects all joints with a Z coordinate between 12 and 14, then sorts the data by XorR, Y, and Z coordinates using the SQL string which follows:
Code Block | ||
---|---|---|
| ||
1: \\ !Applying_advanced_filters_via_SQL_strings_string_1.png|align=center,border=0! {center-text}Figure 1 - Advanced filter SQL string{center-text} \\ Data is organized accordingly in the Joint Coordinates table, as shown in Figure 2: \\ !Applying_advanced_filters_via_SQL_strings_table_1.png|align=center,border=0! {center-text}Figure 2 - Joint Coordinates table{center-text} h1. Report 2 *Report 2* selects all joints with a Z coordinate between 12 and 14, then organizes the data by XorR, Y, and Z coordinates using the SQL string which follows: {code} Z > 12 AND Z < 14 ORDER BY XorR, Y, Z {code} |
The
...
application
...
of
...
this
...
advanced
...
filter
...
SQL
...
string
...
is
...
shown
...
in
...
Figure
...
3:
Figure 3 - Advanced filter SQL string
Data is organized accordingly in the Joint Coordinates table, as shown in Figure 4:
Figure 4 - Joint Coordinates table
Example 2 - select only frame elements with specified labels
The following SQL string can be used to select only frame elements 1 and 2, report results for station 0 and only for load case DEAD (the filters are applied to a model created from scratch using the "3D Frames" template):
Code Block | ||
---|---|---|
| ||
(Frame LIKE '1' OR Frame LIKE '2') AND Station = 0 AND OutputCase LIKE 'DEAD' |
Note that operator LIKE is used for textual fields (Frame and OutputCase), while operation = is used for numerical fields (Station). See Figure 5.
Figure 5 - Filter by frame labels