Solved

remove last comma

Posted on 2014-12-08
4
108 Views
Last Modified: 2014-12-08
Hi,

How can I remove my last comma?

          <cfquery name="New_Portal" datasource="#dsn#" username="#dbID#" password="#dbPassword#">
								Select PortalId as PID, PortalName as PN
								From AppPortal
								Where PortalID IN (#New_Data.Portal#)
							</cfquery>   
                            <CFIF (isDefined("New_Portal") and #New_Portal.RecordCount# gt 0)>
                            <cfoutput query="New_Portal">
                            #New_Portal.PN#,
                            </cfoutput>
                            </CFIF>

The output is this: 

Agent, Group, Internal Facing, Member, Provider, N/A, 

The output that I want is this: 

Agent, Group, Internal Facing, Member, Provider, N/A

Open in new window

0
Comment
Question by:lulu50
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 40486679
Option One...
<cfset allPN = valueList(New_Portal.PN)>
  #allPN#

Option Two..

       <CFIF (isDefined("New_Portal") and #New_Portal.RecordCount# gt 0)>
               <cfoutput query="New_Portal">
                   <cfif new_portal.currentRow gt 1>,</cfif> #New_Portal.PN#
              </cfoutput>
     </CFIF>
0
 

Author Comment

by:lulu50
ID: 40486746
gdemaria,

IIIITTTTT IIIIISSSS WORKING!!!!

GREATTTTTTT!!!!

Thank you :-)
0
 

Author Closing Comment

by:lulu50
ID: 40486747
Thank you
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 40486786
super!  Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Coldfusion get content of HTML table 8 250
Coldfusion : Unix Epoch Time 4 57
coldfusion cfloop help 6 42
Dynamic Table mySQL stored procedure 5 63
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question