Consultor Eletrônico



Kbase P62280: How to convert an integer value to a string using the 4GL?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/13/2004
Status: Unverified

GOAL:

How to convert an integer value to a string using the 4GL?

FIX:

To convert an integer variable value to a string so that it can be used in the WHERE clause of a FOR EACH statement, use the following code:

DEFINE VARIABLE viDeptCode AS INTEGER NO-UNDO.

UPDATE viDeptCode.

FIND FIRST department WHERE deptCode = STRING(viDeptCode) NO-LOCK NO-ERROR.
IF AVAILABLE department THEN
MESSAGE department.deptName
VIEW-AS ALERT-BOX INFO BUTTONS OK.