[ic] Look ahead at next value in a query/list?

Frank Drummond fdrummond at d2computers.com
Mon Jul 7 12:36:43 EDT 2003

New to IC but how about this:

sql="select author||',' FROM authors where article = '[item-code]'

-----Original Message-----
From: Interchange User [mailto:interchange at framework.cx] 
Sent: Monday, July 07, 2003 11:28 AM
To: interchange-users at icdevgroup.org
Subject: [ic] Look ahead at next value in a query/list?

Hi all,

Is there a way to look ahead at values returned by a [query] to tell if 
there is another record about to be returned in between the 
[list][/list] tags?  For instance, I have the following code, which 
returns a list of authors from a table.  I want to put the comma after 
"[sql-param author]" only if there's another author in the list, but 
not at the end.

			sql="select author FROM authors where article =
'[item-code]' ORDER 
BY authorship"
			[sql-param author],

Currently, I end up with something like

"Johnson J, Nichols RJ, Koch C, Gray J, Will L, Ernst B,"

and I'd like to not put the comma in if I'm at the end of my results 



interchange-users mailing list
interchange-users at icdevgroup.org

More information about the interchange-users mailing list