How to rtrim the extra comma at the end

Dear Gurus,
I am trying to trim the extra comma at the end of the sentence but I am not able to trim it at all this is for cursor loop in formula column trigger. Is RTRIM a rightful command to use here! Any Suggestions.
for c1 in (select crv.x crc
from x table
where crv.x = xyz)
loop
if     p_count >= 1 then
     v_descr := v_descr||C1.CRC||', ' ;
end if;
end loop;
return rtrim(v_descr,',');
RESULT IS = ' 010, 002, 115, '

Dear,
Instead of using rtrim function, you can get the desired result by adding a code line and placing the comma at the start as below:
(the added code lines are in bold)
if p_count >= 1 then
if v_descr = '' then
v_descr := C1.CRC;
else
v_descr := v_descr||', '||C1.CRC;
end if;
end if;
end loop;

Similar Messages

  • How to get the end time of an Interface?

    How to get the end time of an Interface?

    Hi,
    As per your reuirement. I will suggest to use IKM SQL to SQL append. and Before Insert statement in IKM u need to add one more step i.e update. Your update should be like this
    command on sourse.
    <%for (int i=0; i < odiRef.getDataSetCount(); i++){%>
    <%=odiRef.getDataSet(i, "Operator")%>
    select      <%=odiRef.getPop("DISTINCT_ROWS")%>
         <%=odiRef.getColList(i,"", "[EXPRESSION]\t[ALIAS_SEP] [CX_COL_NAME]", ",\n\t", "", "((INS and !TRG) and REW)")%>
    from     <%=odiRef.getFrom(i)%>
    where     <% if (odiRef.getDataSet(i, "HAS_JRN").equals("1")) { %>
         JRN_FLAG <> 'D'
         <%} else {%>
         (1=1)     
         <% } %>
    <%=odiRef.getJoin(i)%>
    <%=odiRef.getFilter(i)%>
    <%=odiRef.getJrnFilter(i)%>
    <%=odiRef.getGrpBy(i)%>
    <%=odiRef.getHaving(i)%>
    <%}%>
    Command on target..
    UPDATE <%=odiRef.getTable("L", "TARG_NAME", "A")%> T
    set <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD2)")%> ='N',
    <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD1)")%> =SYSDATE
    where (<%=odiRef.getColList("","T.[COL_NAME]", ", ", "", "UK")%>)
    in(<%=snpRef.getColList("", ":[CX_COL_NAME]", ", ", "", "UK")%>) and <%=odiRef.getColList("", "T.[COL_NAME]", ",\n\t", "", "(UD2)")%> <> 'N'
    check UD1 and UD2 columns.
    Hope this will help you.
    Regards
    Saurabh

  • How to detect the end of a loaded swf file

    Hello Guys
    This is my first time on this forum, come here with a great
    hope
    I have loaded a picture file (jpeg) and a video file (swf)
    into the main flash file using xml
    on frame 3, I load the picture and on frame 7, I load the
    video, there is a stop action on frame 6
    Now when the flash is executed the picture is displayed ( it
    says "Click here to view the video")
    when the user click the picture , the video is loaded and
    starts to play ---- so far everything is working fine
    now what I want to do is, once the video finishes playing (
    not stoped) I want to display the picture again
    can you tell me how to detect the end of an external loaded
    swf files,
    Please help me
    Thanking You
    Shriram

  • How to drag the end of two text objects at the same time

    I have two seperate bits of text in a particular section of video. If I select the two text objects and drag the end left or right it only moves one. I I want to be able to drag the end of multiple things at the same time.
    I may be being dumb but cant find how to do it. Any solutions gratefully received.
    Best
    Tom B.

    Two stacked separate title clips or two text text boxes in a single clip?
    Russ

  • How to switch the end points of a path?

    Hi, I was wondering if anyone knows how to switch end points (or revese them).
    To give you an idea of what I am talking about, have a look at this image:
    you can see that the spiral coils downwards from the start point so that it gets tucked under itself as it spirals.
    How could I switch end points so that it spirals downwards from what is now labeled as the end point instead?
    Or I guess you could say, how can I make it coil upwards from the start point?
    many thanks

    In case you ever find yourself in need of the afore-mentioned command that is common in other drawing programs--especially when you want to reverse the direction of multiple paths at once--you might be interested in the Reverse Path Javascript that is included in the collection on this page. It is particularly useful when employing Brushes, as in your example and these:
    JET

  • How to keep the ending silence of a music file?

    I am fed up...
    iTunes just always clips the ending silence of all my music. This is SO annoying, if you i.e. listen to a classic piece of music, Beethoven, Bach etc. ALWAYS iTunes bombs in the next title on the playlist milliseconds after the previous title has ended.
    I do not know, which "60 beats a second" kid has programmed such a senseless feature....?
    Of course I browsed the Internet, of course I used the search function in this forum.
    It seems really many people have the same problem, but the only solutions are like adding silent 2 seconds mp3 files into the playlist.
    This iTunes is really not a very well programmed software, if users needs these awkward workarounds...
    Is there any smart solution to this problem? Help is really appreciated.

    iTunes doesn't do anything with the "ending silence of a music file".  If you have crossfading turned on (see previous comment) each track will start playing, with a predetermined fade in, before the previous one ends.  You definitely want have that disabled.  Otherwise, each track plays through to the end and the next one starts immediately - there is no "gap".  However, you would normally expect that last few seconds of the track itself to be "silent" so that you hear a gap between each piece of music - just as you would when listening to a CD.  Are you perceiving something different?  There are a couple of somewhat obscure scenarios where the end of a track could be truncated.  One involves a very specific error that could occur if your music has been imported from CD outside iTunes and then transferred to it - but that would require a very deliberate action with certain tools used for this purpose.  In technical terms, the import ignores the "pre-gap" that may precede a track on a CD (you'd see this on some CD players as a brief - usually two second - countdown after the end of one track and before the start of the next.  Most software, iTunes included, normally treats this pre-gap as part of the preceding track.
    The other possibility is that the metadata associated with some tracks has been altered such that playback terminates before the actual end of the track.  However, it requires a specific user action for this to happen - I can't think of a way it could happen accidentally.
    Bottom line is that - unless you've hit one of these unlikely scenarios, or found a previously unreported bug (either in iTunes itself or in its interaction with audio drivers), or have that ghastly crossfade function turned on, you are hearing the music as recorded and mastered.  The only other exception is the case where you are hearing the end of one album/disc immediately followed by the start of the next.  Depending on how its been mastered, there could be a "shorter than expected" gap between them.

  • Help, How to detect the end of sentence in a plain text

    Hi, Everyboday
    I really don't know how to use ArrayList and endsWith to realize detecting the following question. Could you give me some help? Thank you!
    1. find the end of the sentence. that means that we print it out if you meet "!" or "." .....
    2. calculating the frequency of the key word in the whole text. maybe using IDF..
    import java.io.*;
    class SearchEnd{
         public static void main (String[] args){
              try{
                   File myFile = new File("Test.txt");
                   FileReader fileReader = new FileReader(myFile);
                   BufferedReader reader = new BufferedReader(fileReader);
                   String line = null;
                   while ((line = reader.readLine()) != null){
                        System.out.println(line);
                   reader.close();
                   }catch (FileNotFoundException exception){
                   System.err.println("File not found");
                   }catch(IOException exception){
                   System.err.println("IO Error");
    }

    Checkout this thread about how to use these forums effectively. Particularly with College home type questions, expected to be taught how to find the answer rather than be given it outright.
    http://forum.java.sun.com/thread.jsp?forum=54&thread=190747
    -- Question ---
    There are lots of ways to do this, check out the API documentation http://java.sun.com/j2se/1.4.2/docs/api/
    Your sample shows you can iterate the string so checkout these three classes.
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html

  • How to reverse the end date on Oracle Standard Benefits plan for a employee

    Hi,
    We tried to end date a medical benefit plan for an employee but did it wrong. It should show end dated 31-JAN-2010 and then we wanted to add a new plan starting from '01-FEB-2010'. But we wrongly end-dated as on 31-DEC-2010.
    Can anyone help me to identifiy how to remove the wrong end date from the benefit plan for the employee..
    Regards
    Arun Kumar S Rathod

    If you are using life events, just backout the life event and the end-date will go away. then create a fresh life event and make necessary changes.

  • How do find the end user agreement

    how do I find the end user license agreement, I'm so frustrated

    I'm guessing that you have been unable to find the way to accept the end user license for Reader. If you are in Windows (which we don't know), you can try using Windows Explorer to navigate to C:\Program Files (x86)\Adobe\Reader 11.0\Reader, then double-click on Eula.exe and accept the license agreement. If you are in Mac, open your Applications folder, double click on the Reader icon, follow the instructions to accept the license, close and restart Reader.

  • How to delete the ends of line ["\n"] in a String before parsing

    hi, i'd want to parse a String with Regex/Pattern.
    This String contains ends of line i want to delete before applying my parsing treatment.
    I've tried to do that by replacing the character "\n" with "" :
        // the original text
        String orgTextToParse = new String(buffer);
        //we create a pattern to recognize the ends of line
        String regExpEol = "\n";
        Pattern patternEol = Pattern.compile(regExpEol);
        Matcher matcherEol = patternEol.matcher(orgTextToParse);
        // the new text without end of line
        StringBuffer newTextToParse = new StringBuffer();
        // we replace the "\n" by ""
        while(matcherEol.find()) {
          String REPLACE = "";
          matcherEol.appendReplacement(newTextToParse,REPLACE);
        matcherEol.appendTail(newTextToParse);
        System.out.println("[new string start] " + (newTextToParse.toString()) + " [end of new string]");Is there an appropriate way to delete "\n" ?
    (perhaps a method of the Pattern or Matcher classes... ?)
    thanx
    Edited by: jfact on Dec 29, 2007 11:05 AM
    Edited by: jfact on Dec 29, 2007 11:06 AM

    The second (optional) argument to Pattern is a set of flags. Take a look at the Javadoc.
    The 'genomic' implication is that the EOL is an arbitrary line break for human consumption so it does look like you need to remove the EOL. I would just use replaceAll() since it can be done with one line of code (or just a couple if you pre-compile the regex) without the need for any looping.
    line = line.replaceAll("\n","");Edited by: sabre150 on Dec 29, 2007 10:27 AM

  • How to get the end of a download action ?

    Hello !
    My web application must download zip file.
    Actually, the servlet's code for download is like this :
    response.setContentType("application/download");
    response.setHeader("Content-Disposition","inline; filename=DownloadFile");
    ServletOutputStream l_ServletOutputStream = response.getOutputStream();
    l_ServletOutputStream.write(l_ByteArrayOutputStream.toByteArray());
    l_ServletOutputStream.flush();
    The client can see a popup dialog box asking him to save the file on disk or open it or cancel. In case of save action, file is downloaded but I don't know when this action finished. Is there any event to catch or something else that inform about the end of downloading action ( I have to refresh the display with a new JSP ) ?
    Thanks for your help !

    Propably to correct way would be to use HTTP-headers to indicate the length of the file, so actual application download is possible also through other clients, rather than the specific one, so you could do:
    response.setHeader("Content-length",l_ByteArrayOutputStream.toByteArray().length);I'm not really sure if servlets do this automatically, they really should though, but I'm hazy on their implementation and you might want to check the HTTP specification on whether or not the length of the headers should be included in the Content-length field, as it might be required to.
    Tuomas Rinta

  • How to get the End date of the dynamic period in Financial Reports

    Dear All,
    I have a issue with the Financial Report, I want to show the text under the Heading in the Balance Sheet like 31 DEC 2008 but in this date should be the end date of the dynamic period what user select in the POV.
    Can any one have any idea about this.
    Regards
    rao.

    There are 2 options:
    1. Use the POVAlias text function:
    e.g. <<POVAlias ("Grid1", DimName)>>
    (you could also use POVMember if the items you want is the member and not the alias).
    2. Have a hidden column on the report referencing the POV selection, then reference this in the header.

  • How to detect the end of an external swf loaded into a container

    Hi,
    I'm having trouble finding a solution for this problem, can somebody help me?
    I have a main swf that will load external swfs into a container. I need to detect the end of the loaded external swf in order to start to load and play a new one into the same container.
    The problem is that i do not know what the length of the external swfs will be, and will have no control over the development of them, so i cannot place a variable at the end of their animation which would allow me to detect from the main movie its end.
    I also cannot rely on the _totalFrames property because the loaded swf might not have all the animation inside its main timeline.
    Is there any way to achieve this goal?
    Thx

    Ok... Its as i thought... unfortunatly...
    Gonna mark your latest post again as possible solution, just in case someone comes with any sort of out of the box thing...
    Thx for your help Kglad

  • How to detect the end of a movie clip:  what eventListener to use?

    I'm doing a rather fancy button with up,down,rollover,rollout,and static states, something the standard flash button structure isn't capable of as far as I can tell, and believe me, I've tried it.
    Here's the setup:  My main timeline has a series of frames with stop(): scripts, and each frame has a movie clip representing what should happen during that state:  still, rollover, rollout, mousedown, mouseup
    I can't get the mouseup event  to work.
    Here's what I've tried so far that doesn't work:
    1. in the imbedded movieclip, no script at the end.  Result: This just loops the embedded clip.
    2. in the imbedded movieciip, put gotoAndPlay("NextFrame"), where "NextFrame" is the label in the root movie where I want to go. result: loops clip
    3. in the imbedded movieciip, put root.gotoAndPlay("NextFrame"), where "NextFrame" is the label in the root movie where I want to go. result: error
    I think what I need to do is write an eventListener for the root actionscript, but I don't know what event to listen for. 
    What event is thrown when a movieclip finishes playing?
    :<)McFrisco

    You have to create your own mechanism(s) for detecting the end of a movieclip being reached.  You can either build code into the end of the clip itself, possibly dispatching an event that is being listened for by a containing timeline, or you could continuously monitor the currentFrame of the clip to see if it equals the totalFrames value.

  • How to Allow the End User to Save a Form

    How do I allow an end user to save form after they've filled it out? I understand this can be accomplished using the distribute function where you email the form to people. We don't want to do that. We want to put it on a website and allow them to access it, open it, fill it out, then save a copy to their hard drive (with the data they entered visible). I have searched the forums and cannot seem to find a solution for this.  Thanks, in advance!

    Hi Kyle. Thank you for the reply.  I do have Acrobat Pro, so I will try that. To make sure I understand correctly, the form has to be create in LiveCycle Developer, then you have to open it on Acrobat Pro and set the permissions?

Maybe you are looking for