At 01:34 PM 5/27/2014, Dr. Fritz Luettgens wrote:
can anybody give me a short tip where to find Info in Docs
about function template (COUNT(arg))?
Fritz,
It all depends on what you are trying to accomplish.
A quick and very simple example:
-- Example 01
CONNECT RRBYW18
SET VAR vRows INTEGER = 0
SET VAR vCustState TEXT = 'PA'
SELECT COUNT(*) INTO vRows INDIC iv1 FROM Customer +
WHERE CustState = .vCustState
IF vRows = 0 THEN
PAUSE 2 USING 'No Customers for Selected Criteria!' +
CAPTION 'Understanding Count' ICON INFO +
BUTTON 'Press any key to continue ...' +
OPTION MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_COLOR RED +
|MESSAGE_FONT_SIZE 11 +
|THEMENAME Longhorn
GOTO Done
ENDIF
CLS
BROWSE * FROM Customer WHERE CustState = .vCustState NOCHG
LABEL Done
CLEAR VARIABLES iv%,vRows,vCustStat
RETURN
You can customize the SELECT COUNT(*) statement based on anything,
including the customized WHERE clause.
Hope that helps!
Very Best R:egards,
Razzak.
www.rbase.com
www.facebook.com/rbase
--
31 years of continuous innovation!
16 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--