Kbase P98288: SQL-92: How query Progress for a blank unknown null date field?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  20/04/2005 |
|
Status: Unverified
GOAL:
SQL-92 & SQL-89: How to select records with a blank date field?
GOAL:
SQL-92 & SQL-89: How select records with an unknown date field?
GOAL:
SQL-92 & SQL-89: How select records with a null date field?
FIX:
The following SELECT statement uses the 'IS NULL' phrase to list customers whose orders have not been shipped yet:
SELECT
Pub.Customer.CustNum,
Pub.Customer. Name,
Pub.Order.OrderNum,
Pub.Order.OrderDate
FROM
Pub.Customer,
Pub.Order
WHERE
Pub.Customer.CustNum = Pub.Order.CustNum
AND
Pub.Order.ShipDate IS NULL;
The following SELECT statement uses the 'IS NOT NULL' phrase to list customers whose orders have already shipped:
SELECT
Pub.Customer.CustNum,
Pub.Customer. Name,
Pub.Order.OrderNum,
Pub.Order.OrderDate
FROM
Pub.Customer,
Pub.Order
WHERE
Pub.Customer.CustNum = Pub.Order.CustNum
AND
Pub.Order.ShipDate IS NOT NULL;