CHOOSE always returns a text value

I tend to use something along the lines of:

SET VAR vtEmplID text
SET VAR vEmplID integer
CHOOSE vtEmplID FROM #VALUES FOR (LastName & FirstName),EmplID + 
  FROM Employees ORDER BY LastName,FirstName
SET VAR vEmplID = (INT(.vtEmplID))
EDIT USING Employee WHERE EmplID = .vEmplID

although, equally valid is to leave out the vEmplID and use
EDIT USING Employee WHERE EmplID = (INT(.vtEmplID))


Edwards Lucas <[EMAIL PROTECTED]> wrote:

>Please someone correct me here.
>I'm assuming the syntax for CHOOSE is as follows:
>
>CHOOSE varname FROM #VALUES FOR (expression),retcol FROM tblname WHERE
>clause AT scrnrow scrncol TITLE 'title' CAPTION 'text' LINES n FORMATTED
>
>Where retcol is the value returned to varname and can be an integer, text,
>whatever.
>
>If this is the case can anyone please explain to me why the following code
>returns a text value?
>
>CHOOSE vresident FROM #VALUES FOR ((LJS((CTXT(IDNO)),6)) & LASTNAME &
>FIRSTNAME),IDNO +
> �FROM CLIENT WHERE LASTNAME LIKE .vsearch AND STATUS NOT IN ('OWL') +
> �AND COURID LIKE .vuser ORDER BY LASTNAME AT 8,25 TITLE 'Choose Residents'
>+
> �CAPTION 'Resident' LINES 20 FORMATTED
>
>Where CLIENT.IDNO is a unique integer.
>
>After the CHOOSE, vresident = ((LJS((CTXT(IDNO)),6)) & LASTNAME & FIRSTNAME)
>In fact, if I declare vresident INTEGER = NULL then Rbase returns an error.
>????????????????
>I'm using 6.5++ 1.851xRT03
>
>Thanks anyone.
>Lucas Edwards
>Information Systems
>Wesley Mission Brisbane
>


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to