try:

<cfoutput>#listQualify(valueList(queryName.columnName), """")#</cfoutput>

the valueList() function takes the values from a specified column in a specified query, and places those values in a comma delimited list (comma by default, but you can specify any other delimiter).

the listQualify() function takes a list, and appends/prepends a string to each list element.  in the case above, you would be appending/prepending a double-quote (note that it's doubled up in the argument for the listQualify() function, as it needs to be escaped).

Also, bear in mind that there is a function called quotedValueList(), which will not only return the query values as a list, but also put each value in single quotes.  You specified double quotes in your original question, so I'm not sure if that would help you out or not.  But if single quotes are an option, you can just do <cfoutput>#quotedValueList(queryName.columnName)#</cfoutput>

hth,
charlie

  ----- Original Message -----
  From: Jones, Becky
  To: CF-Talk
  Sent: Thursday, October 09, 2003 9:25 AM
  Subject: List with commas

  Hi,
  I want to do something that seems like it should be easy, but i cant figure it out.
  i want to take my query results and output it with double quotes around each item with a comma seperated inbetween.  

  Any help would be appreciated.  My query returns a bunch of tiles.  i want it to output like so: "Test 1", "Test 2", "Test 3"

  Thanks in advance for your help. :)
  bec.
  *************************************************
  This e-mail, including any attachments, is intended for the
  receipt and use by the intended addressee(s), and may contain
  confidential and privileged information. If you are not an intended
  recipient of this e-mail, you are hereby notified that any unauthorized
  use or distribution of this e-mail is strictly prohibited.

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to