An official website of the United States government
Skip Navigation

Case Selection Line Dialog

left-img

The Case Selection Line dialog is used to create a single selection statement line in the Case Selection Dialog. The line specifies a requirement for the records that are used in the session. A line takes the form of a variable and the values that are allowed for it. 

To use a variable in a selection statement line, work from left to right through the boxes at the top of the dialog. First, select a variable. Then choose an operator. Finally, specify the values for this variable.

Variable

Each line of a selection statement defines selection criteria for one variable. The variables in the database are listed in categories displayed as folders in this box.

To expand a category, double-click the folder label or click the plus sign (+) next to it. This reveals the individual variables contained in the category.

Click on the variable you want to use to highlight it, then move to the Operator box.

If you choose a merged variable, it will be converted to its underlying selection statements when you click OK. Note that in Rate and LD Prevalence sessions, merged variables can only be used in a selection statement if all of their underlying variables have the same data source (i.e., appear in the same one of the three boxes on those sessions' Selection tabs).

Operator

Two operators, "is = to" and "is not = to", are available when defining selection criteria on the Selection tab. In the selection statement, the "is = to" operator is represented by "=", and the "is not = to" operator is represented by "!=". Select the operator you want to use in the combo box, then move to the Values list.

When creating a merged variable grouping, the "is not = to” operator is disabled.

Values

There are two formats used for the Values box, a list format and a range format. For some variables, you will see a list of all values for that variable; that is, all groupings defined for the variable. Some variables have so many values that it is not practical to list them all; for these variables, the range of all possible values will be shown.

When selecting values from a list, you may select one or more values. Simply click on a variable to select it; it will become highlighted. The standard methods used in Windows for selecting multiple items from a list can be used here, including:

  • Holding down the Ctrl key while you click on groupings you want to select or deselect.
  • Holding down the Shift key while you click the first and last groupings of a list you want to select. Those two groupings and all groupings in between will be highlighted.
  • Clicking and dragging the mouse cursor over the groupings you want to select.

If you want to specify a range of values for a variable, use a hyphen to define the range and use commas to separate multiple values or ranges (e.g. "1-5,8-19"). In range format, the valid values for the variable are shown just above the Values box.

Note that some variables can have both the range and list formats.

Find

If you are having trouble locating a variable using the list of categories, click Find to access the Find Variable dialog.

Variable Description

This section shows a description for the currently selected variable in the Variable List.

Selection Statement Line

This section shows the text equivalent of the selections you made above in the lists. It will typically be of the form [variable] = [value list]. When you press OK, this text will be added to the list of lines you have on the Case Selection Dialog.

The following is an example of a finished selection statement line:

  • {Race, Sex, Year Dx, Registry, County, Year of diagnosis} = '1973','1974','1975','1976', '1977','1978','1979' 

The syntax used in selection statement lines is as follows:

  • Variables are shown within braces: { }
  • The variable text has two parts. The part before the period is the variable's category. The part after the period is the variable's name. This syntax is also used when printing a session or matrix. It is designed to help you easily find a variable in the Variables box or dictionary.
  • The values of a single variable are delimited by commas (see the years of diagnosis in the above example). These commas are implied "OR" operators. The above statement is selecting records with a year of diagnosis equal to 1973 or 1974 or 1975 or 1976, etc. 

Copy

This button will copy the text of the selection statement line to the Windows clipboard.

Paste

This button will copy text from the clipboard into the selection statement line. The text will be parsed as it is required to be a valid SEER*Stat selection statement line. If it is valid, the text will be displayed above, and the Variable, Operator, and Values section will change to correspond to the new statement.

OK / Cancel

If you do not want to keep your changes, press the Cancel button. If you'd like to keep the changes press the OK button. The statement will be validated and if acceptable, you will be returned to the Case Selection Dialog with the new line added or modified. 

right-img