Jim: Not sure what point you were trying to make. If I was selecting the LISTOF into a variable, my variable was pre-defined as a Note type to make sure it's large enough to return a comma-delimited string of items. If I was inserting the LISTOF into a table column, that column was defined as a Note datatype.
It works fine in 7.6 as long as the data you are listing is a Text datatype, but in 6.5 it also worked if the data was Integer. This is what's not explicitly mentioned in the help file -- what the datatype of the column you are listing has to be so I assume it is supposed to work directly on all datatypes. The problem I was having in 7.6 is when the LISTOF is operating to get a list of data from an Integer column rather than a Text column. Using the same working 6.5 code, inserting the LISTOF into a note column gave me an error; putting a CTXT into the LISTOF fixed the problem. When I tried a workaround to instead select the LISTOF into a note-type variable, it sometimes worked and sometimes gave me a "truncate" error even though it was selecting only 1 or 2 items so it wasn't exceeding any length. Karen > Karen, > Here is the text from my v7.6 help file > "LISTOF > > > > The aggregate functions (AVG, COUNT, MAXIMUM, MINIMUM, STDEV, SUM, VARIANCE) > used in COMPUTE/SELECT commands now have a new member of their family called > "LISTOF" which creates a text string of the values separated by the current > comma delimiter character. > > > The LISTOF function can be used with the "SELECT ... INTO ..." to populate a > variable with a list of values which can then be used in a CHOOSE command > with the #LIST option. It can also be used in Forms, Reports or Labels to > look > up values from multiple rows. > > LISTOF returns a NOTE type and notes are limited to 4K. " > > This text does not reflect the latest enhancement which allows the > receiving varable to defined as variable character. > > To the best of my knowledge it has always returned a "TEXT" value. Also, > since you are returning "integers" (defined in a text variable) implicit > datatyping should allow you to use that variabvle as a valid argument to > "WHERE > integercol IN &textvarname" > > Jim Bentley > >

