30.01.2015 Views

Picture Perfect 4.6 User Manual - UTCFS Global Security Products

Picture Perfect 4.6 User Manual - UTCFS Global Security Products

Picture Perfect 4.6 User Manual - UTCFS Global Security Products

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 14<br />

Reports<br />

295<br />

Characters typically used in a LIKE string are:<br />

% A percent character matches zero or more characters.<br />

_ An underscore character matches any single character.<br />

Example: The following SQL select statement retrieves a list of reader descriptions from the<br />

reader table where the reader description starts with the characters Lob and ends with zero or<br />

more unspecified characters.<br />

SELECT description FROM reader WHERE description LIKE "Lob%"<br />

Example: The following SQL select statement retrieves a list of reader descriptions from the<br />

reader table where the reader description contains the word Door or DOOR anywhere in the<br />

description.<br />

SELECT description FROM reader WHERE description LIKE "%Door%" OR "%DOOR%"<br />

Logical operators<br />

Use AND, OR, and NOT to connect one or more search conditions that create a comparison<br />

condition.<br />

AND<br />

OR<br />

Use AND to retrieve data that matches both of the values connected by AND.<br />

The following SQL comparison statement retrieves each reader described as Engineering<br />

Reader and also has a set interval time of less than 5 seconds.<br />

SELECT description FROM reader WHERE description = "Engineering Reader" AND<br />

Interval_Time < 5<br />

Use OR to retrieve data that matches either one of the values connected by OR.<br />

The following SQL comparison statement retrieves reader descriptions that match either Lobby<br />

Reader or Cafeteria Reader:<br />

SELECT description FROM reader WHERE description = "Lobby Reader" OR description =<br />

"Cafeteria Reader"<br />

NOT IN<br />

Use NOT IN to screen out data that you do not want in the report.<br />

For example, the following SQL comparison statement retrieves all reader descriptions except<br />

those described as Engineering or Antipassback.<br />

SELECT description FROM reader WHERE description NOT IN ("Engineering", "Antipassback<br />

Reader")

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!