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

Reply via email to