Not very pretty, but this should work: <@REPLACE STR="value1,value2,value3,value4," FINDSTR="," REPLACESTR="" POSITION="<@LENGTH STR='value1,value2,value3,value4,'>">
Or (quick and dirty) just attach some valueX to the end of the string that will not negatively afect result of your query, like value1,value2,value3,value4,someNeutralValue A. > -----Original Message----- > From: Brandano, Peter [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 8:58 AM > To: Multiple recipients of list witango-talk > Subject: Witango-Talk: formatting a resultset > > > Hello, > > I was wondering if anyone out there has ever tried to format > a SQL query > result set into a comma-delimited string. It seems that it is not a > straightforward process, unless there is a meta tag I don't > know of. Here is > what I am currently doing: > > // the following line is in the results page of a DB query > that retrieves a > table of values > > <@ASSIGN NAME=l_categoriesArray SCOPE=Local > VALUE=@@local$resultSet[*,*]> > > // This code is used to return the first column of the resultset > > <@VAR name='l_categoriesArray[*,1]' ENCODING=URL APrefix='' ASuffix='' > RPrefix='' RSuffix='' CPrefix='' CSuffix=','> > > As you can see I am overriding tango's default array formatting which > creates an HTML table of values. Instead, I set all of the > prefixes and > suffixes to the empty string "", except the CSuffix. This gives me the > following result: > > value1,value2,value3,value4, > > THE PROBLEM: I need to get rid of the last comma. When I > split the string > into an array using a comma delimiter, I end up with an extra > index at the > end of my array. Using the <@LEFT> or any other string > formatting meta tag > doesn't seem to work. ANY IDEAS? > > Pete > ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body