[an error occurred while processing this directive]
This option allows custom requests. Constraints are entered using SQL syntax, but you need not have detailed knowledge of SQL to enter your constraints. There are four types of queries that can be formed in the Additional Constraints section of Gator:
You can see an example of a search here.
You can perform simple computations with data from numeric columns or on numeric constants in a select list using standard arithmetic operators: +, -, /, *, and % (modulo). When there is more than one arithmetic operator in an expression, multiplication, division, and modulo are calculated first, followed by subtraction and addition. Expressions within parentheses take precedence over all other operations.
Available Math Functions| abs(numeric_expression) | Absolute Value |
| acos(float_expr) | Arc Cosine |
| asin(float_expr) | Arc Sine |
| atan(float_expr) | Arc Tangent |
| atn2(float_expr1,float_expr2) | Computes the angular component of the polar coordinates associated with (float_expr1, float_expr2) |
| ceiling(numeric_expr) | Closest highest integer to the floating point, e.g. if the floating point value is 5.5 this will return 6. If the value is -5.5, it will return -5. |
| cos(float_expr) | Cosine, float_expr is in radians. |
| cot(float_expr) | Cotangent, flat_expr is in radians. |
| degrees(numeric_expr) | Changes radians to degrees. |
| exp(float_expr) | Exponential |
| floor(float_expr) | Closest lowest integer to the floating point, e.g. if the floating point value is 5.5 this will return 5. If the value is -5.5, it will return -6. |
| log(float_expr) | Logarithm (base e) |
| log10(float_expr) | Logarithm (base 10) |
| pi() | Value of pi |
| power(numeric_expr,power) | numeric_expr raised to the power of power |
| radians(numeric_expr) | Changes degrees to radians. |
| round(numeric_expr, integer_expr) | Returns the rounded value of the first expression, out to integer_expr digits |
| sign(numeric_expr) | Gives the sign of the value: positive or negative, as 1 or -1. |
| sin(float_expr) | Sine. The float_expr is in radians. |
| sqrt(float_expr) | Square root |
| tan(float_expr) | Tangent. The float_expr is in radians. |
Each constraint in this section has a textbox for a minimum and maximum value. Minimum and maximum values should be expressed as follows:
You can use the BETWEEN keyword to search for the lower and upper value as well as the values in between them. NOT BETWEEN finds all rows not inside the range.
Example
ra between 12 and 14
dec not between -90 and 0
The IN keyword allows you to select values that match any one of a list of values. NOT IN selects values that do not match values in the list. The parentheses are required.
Example
Hubble_Type in ('Sa', 'Sb', 'Sc')
This is more concise than:
Hubble_Type = 'Sa' or Hubble_Type = 'Sb' or Hubble_Type = 'Sc'
The LIKE keyword is used to select rows containing column values that match specified portions of character strings. LIKE is used with character strings and text columns. LIKE accepts 2 wildcards:
NOT LIKE can be used with the same wildcards.
Character strings must be enclosed in single or double quotes. Do not use back-quotes (`) nor curly quotes ( “ , ” ) .
MATCHES accepts 4 wildcards:
Examples:
au_lname LIKE '%son' - Selects names ending with "son". For example, this string would returns "albertson" as well as "son".
au_lname LIKE '%en%' - Selects any name with "en" in it. For example this would return "english," "steven," "dennis," etc.
au_lname LIKE '_ars' - This string searches for 4 letters ending with "ars". For example, it would return "lars" but not "sears".
au_lname MATCHES '[M-Z]inger' - All names beginning with M to Z and ending with "inger", for example Pinger, Ringer, Singer, but not Dinger nor Wringer.
au_lname MATCHES 'M[^c]*' - Matches all names beginning with M, but not having c as a 2nd letter, for example MacDonald but not McDonald.
IMPORTANT NOTE: The only conditions that you can use on character columns are "=" (equals), LIKE, NOT LIKE, MATCHES, or NOT MATCHES.
When a literal string equality is desired, it is recommended that you use "=" in the constraint. For example:
k_mrg_flg='200302'
However, to find records that contain substring matches (using wildcards), you should use LIKE. For example, to locate k_mrg_flg values with any characters followed by '2', you might try the following:
k_mrg_flg='%2'
Although this is syntactically valid SQL, it will result in no matching records because these flags contain only numeric characters such as '200302'. To get the constraint you need on this character column you should type:
k_mrg_flg LIKE '%2'
Note that '%' is the wildcard used with the LIKE condition (not "*").
The logical operators AND, OR and NOT are used to connect search conditions in the WHERE clause. When more than one logical operator is used in a statement, NOT is evaluated first, then AND, and finally OR. You can use parentheses to change the order of evaluation within your constraints.
Examplesnot fnu_60/fnu_100 > 0.25
(fqual_12 = 3 or fqual_60 = 3) and major <5.0
An entry of NULL in a data table means that there is no entry (e.g., missing data). NULL is not synonymous with 'zero' or 'blank'. 'NULL' and 'null' are equivalent.
Examples:
Bmag is null
Bmag is not null
Note that some data tables may have columns where null values are not permitted.
[an error occurred while processing this directive]