HP Neoview SQL Reference Manual page 244

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

EMPNUM
------
1
23
29
...
343
557
568
--- 23 row(s) selected.
This predicate is true if the part number is equal to any part number with more than five
units in stock:
partnum = ANY (SELECT partnum
Consider this SELECT statement using the preceding predicate:
SELECT ordernum, partnum, qty_ordered
FROM sales.odetail
WHERE partnum = ANY (SELECT partnum
The inner query providing the comparison values yields these results:
SELECT partnum
FROM sales.odetail
WHERE qty_ordered > 5;
Part/Num
--------
2403
5100
5103
6301
6500
....
--- 60 row(s) selected.
The SELECT statement using this inner query yields these results. All of the order numbers
listed have part number equal to any part number with more than five total units in
stock—that is, equal to 2403, 5100, 5103, 6301, 6500, and so on:
SELECT ordernum, partnum, qty_ordered
FROM sales.odetail
WHERE partnum = ANY (SELECT partnum
Order/Num
----------
100210
100210
100210
100210
100250
100250
100250
100250
......
--- 71 row(s) selected.
244
SQL Language Elements
FIRST_NAME
LAST_NAME
---------------
--------------------
ROGER
GREEN
JERRY
HOWARD
JANE
RAYMOND
ALAN
TERRY
BEN
HENDERSON
JESSICA
CRINER
FROM sales.odetail
WHERE qty_ordered > 5)
FROM sales.odetail
WHERE qty_ordered > 5);
FROM sales.odetail
WHERE qty_ordered > 5);
Part/Num
Qty/Ord
--------
----------
244
2001
2403
5100
244
5103
6301
6500
....
SALARY
-----------
3
3
6
10
4
10
15
10
..
175500.00
137000.10
136000.00
39500.00
65000.00
39500.00

Advertisement

Table of Contents
loading

Table of Contents