Kbase P113405: How to write a SELECT statement for a scalar function only?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/13/2006 |
|
Status: Unverified
GOAL:
How to write a SELECT statement for a scalar function only?
GOAL:
How to return one instance only of the current time or system date?
FIX:
The following SELECT statements return one value of the scalar specified function:
SELECT CURTIME() FROM pub.customer WHERE custnum = 1;
SELECT SYSDATE() FROM pub.customer WHERE custnum = 1;
SELECT DATABASE() FROM pub.customer WHERE custnum = 1;
SELECT DAYNAME(SYSDATE()) FROM pub.customer WHERE custnum = 1;
Notice that it does not matter which table you use in these examples. What matters is that the WHERE clause would normally return EXACTLY one record from that table.