Pitney Bowes MapInfo Professional User Manual

Page 442

Advertising
background image

The following expression gives you better results:

1. Round(MED_AGE, 1)=42

Comment: The function "round(somenumber, somenumber)" rounds the first number in the way specified
by the second. In this example, the first number is the median age (MED_AGE) and the second is 1,
indicating that median age is to be rounded to the nearest whole number.

English: All rows where the amount does not equal $23,000.

1. AMOUNT<>23000

Comment: You might want to use the Round function, as in 10, if you are not concerned that the value
be exactly 23000.

String Comparison

String comparisons are based on the exact character content of the string. In this case ">" means
"alphabetically greater than" (for example, comes after in the alphabet) and "<" means "alphabetically
less than."

When typing a string into an expression, you should enclose it in quotes so that MapInfo Professional
knows to treat it as a string, rather than treating it as a column name.

English: All rows where the vendor is Acme.

1. VENDOR="Acme"

Comment: Note that Acme is in quotes so that MapInfo Professional knows to treat it literally (as a
character string) rather than to search for a column named Acme.

English: All rows where the vendor is not Acme.

1. VENDOR<>"Acme"

Date Comparison

English: All entries received on October 9, 1991.

1. RECEIVED="10-9-91"

Consider these conventions:

Note:

• The date is enclosed in quotes

• It is in the form: Month, Day, Year

• The numbers in the data are separated by a hyphen or a slash (/)

• Two characters were used for the year. You can also use four characters (1991)

English: All received after October 9, 1991.

1. RECEIVED>"10-9-91"

Comment: This expression does not select those received on October 9, 1991. When you want them
as well:

1. RECEIVED>="10-9-91"

English: Records for all received before August.

1. Month(RECEIVED)<8

Comment: This expression uses the Month function to extract the month in the date. It does not specify
any particular year. When your database has records for several years, this expression does not pay
attention to the particular year.

Logical Comparison

English: All that have shipped.

1. Shipped

MapInfo Professional 12.5

442

Creating Expressions

Advertising