Download UniVerse SQL User Guide

Transcript
C:\Program Files\Adobe\FrameMaker7.0\UniVerse 10.2\sqluser\Ch2
9/25/06
Center
Las Vegas Convention
Center
Chicago State Fair Ground
175
8000
150
6000
4 records listed.
Use OR to connect two search conditions when you want to select a row if either
search condition is (or both are) true. To list all locations that offer either 150 or more
acres or 6,000 or more seats, enter:
>SELECT DESCRIPTION FMT '30L', ACRES, SEATS FROM LOCATIONS.T
SQL+WHERE ACRES >= 150 OR SEATS >= 6000;
DESCRIPTION...................
ACRES
SEATS
Detroit State Fair Ground
Milwaukee State Fair Ground
Springfield State Fair Ground
.
.
.
Portland State Fair Ground
Reno State Fair Ground
150
25
125
1000
6000
6000
175
175
5000
4000
21 records listed.
You can string together more than two search conditions, and the search conditions
connected by the ANDs and ORs can themselves be compound search conditions. To
list the Shetlands vaccinated after January 1, 1993, that are suitable for rides, enter:
>SELECT ANIMAL_ID, NAME FROM LIVESTOCK.T
SQL+WHERE DESCRIPTION LIKE 'Shetland%'
SQL+AND USE = 'R'
SQL+AND VAC_DATE > '1/1/93';
ANIMAL_ID
NAME......
33
46
58
43
31
51
71
15
5
Eggau
Mora
Tumu
Gombi
Akure
Banyo
Bousso
Kontagora
Sokoto
9 records listed.
2-31
UniVerse SQL User Guide