Karen,
I happened to be looking at the LISTOF function of SELECT yesterday with my
SRPL oddity and the help does indicate that a text string is returned. Maybe
that's the clue...
I didn't like the way that SRPL was apparently forcing me to put my spaces in
the list (extracted in practice from a LISTOF result) so I went about it a
different way in the end. One of the (many) joys of R:Base is that there are
always other ways to these things.
Another oddity is that the same section of help has an example of replacing in
LISTOF text using SRPL with a space so I was even more puzzled. Thanks to Buddy
& Dennis for their enlightenment, though, since the space in the variable does
work.
Regards,
Alastair.
----- Original Message -----
From: [EMAIL PROTECTED]
To: RBASE-L Mailing List
Sent: Thursday, October 23, 2008 5:02 PM
Subject: [RBASE-L] - Difference in LISTOF command
I found a difference in how the LISTOF works between versions 6.5 and 7.6
that I thought I would mention in case you do a conversion and have a LISTOF
used the way I did.
I used LISTOF to get a list of an Integer column into a table. I used this
code in 6.5 successfully:
INSERT INTO tmpQBNotes (BillTo, tmpNote) SELECT +
BillTo, (LISTOF( BLNo )) +
FROM sales WHERE &vWhere +
GROUP BY BillTo
In 7.6, I got a "row size" error even though the results were small. So I
tried doing it the "old fashioned" way by a cursor through each distinct BillTo
and doing the same LISTOF into a variable, but I would get some rows with a
"truncated" warning, and successive cursors would get the error on different
rows.
Don't know what made me think of it, but BLNo is an integer field. So I
tried the following command to convert to a text and all works well. The help
screens don't say that the items to be listed have to be of text type, but in
this case it appeared that it helped to convert it:
INSERT INTO tmpQBNotes (BillTo, tmpNote) SELECT +
BillTo, (LISTOF( CTXT(BLNo) )) +
FROM sales WHERE &vWhere +
GROUP BY BillTo
Karen
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.2/1741 - Release Date: 23/10/2008
07:54