Albert,
I have spend much of the day trying to resolve a problem that I have with a
form - I even e-mailed RDCC last night just before the latest upgrade was
announced.
Having downloaded that I have had the same problem so I've been analysing my
form and have come up with a problem with this command:
SELECT (SRPL(LISTOF(Menu_Returned), ',', ''',''', 0)) +
INTO vCheckList FROM Various_Menus +
WHERE Menu_Type = 4 AND Menu_Sort BETWEEN 11 AND 19
which used to work but now seems as if it can produce a null instead of the
correct string.
My current workaround is:
SELECT (SRPL(LISTOF(Menu_Returned), ',', (
(CHAR(039))+(CHAR(044))+(CHAR(039)) ) , 0)) +
INTO vCheckList FROM Various_Menus +
WHERE Menu_Type = 4 AND Menu_Sort BETWEEN 11 AND 19
which, along with:
SET VAR vCheckList = ( (CHAR(040))+(CHAR(039))+ .vCheckList +
(CHAR(039))+(CHAR(041)) )
which gives the result I want:
('DI','ED','HA','IP','IS','JR','RQ','UK')
however I am still testing before I report back to RDCC...
Regards,
Alastair.
----- Original Message -----
From: "Albert Berry" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Thursday, September 18, 2008 5:19 PM
Subject: [RBASE-L] - Problem with LISTOF
I have a problem that appears to have arrived in one of the recent
updates. I must admit that the help files do not list the function as a
SELECT ... GROUP BY specifically, but it used to work.
Create a table consisting of one Integer and one text 30 column: The
real table is, of course much wider, but this will serve as an example.
CREATE TABLE TestTable ( +
IDCol INTEGER, +
TextValue TEXT (30) )
LOAD TestTable
1,"One"
1,"Two"
1,"Three"
2,"One"
2,"Four"
END
-- An index on IDCol makes no difference to the results.
CREATE INDEX TestTable ON TestTable (IDCol)
-- Nor does this index
CREATE INDEX TestTable2 ON TestTable (IDCol,TextValue)
-- I tried this with and without parens around the LISTOF() function.
SELECT IDCol, (LISTOF(TextValue)) +
FROM TestTable +
GROUP BY IDCol
This results in an error message that the row width exceeds 4,096 and
the select fails. This worked up until update 30909, but that might have
been an oversight somewhere. It appears to have broken at 30909.
Anyone have any ideas? This is used to create a summary of the text
values in a column for a compressed data report in comma delimited string.
I will rework to use a cursor in the mean time.
Thanks!
Albert
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.6.21/1678 - Release Date: 18/09/2008
09:01