How to return only the first string

Hi Guys,
I have a mapping where I am creating a filename from data in within my data file, I am using one of my variables i.e. Account
The data looks like this
Account:
123
123
123
456
456
456
789
789
789
What I want is to is return only the first row u201C123" and concatenate it with a constant to make up the filename.
Any help will be appreciated.
Kind Regards,
CJ Bester

very simple
use copy value standard function like below.
Account------->copyvalue(0)----------->
                                                                  CONCAT------------->TARGET
                                     Constant------->
Regards,
Raj

Similar Messages

  • How to get only the first result in extract function

    do you know how to get only the first element of the function extract.
    v_result := p_response.doc.extract('//'||p_name||'/child::text()').getstringval();
    if i have 5 responses like '100','100',100','200','200' e get '100100100200200' and i want only '100'.
    thanks in advance

    Two ways .....
    1. Use Javascript E4X instead ...there are nice functions for getting children of parents.
    2. Cycle through all of the form1.nodes and look for objects that have a className of "subform". For loops are useful for this task.
    Make sense?
    Paul

  • How to replace only the first specified character in a string and leave other occurrence of the character alone.

    Hello my Friends:
    I have a string that looks like this in a column:
    Hello, World, Hello, Planet
    I want to replace only the first occurrence so that the result looks like this:
    Hello World, Hello, Planet
    Working on some bad data source.
    I need to replace the character regardless of it's location as long as it is the first.
    I tried something like this, but I soon discovered that if the comma or character is missing the the string may get truncated or altered. If there are no characters in the string, then I want to simply leave it alone.
    Here is where I am at:
    DECLARE @MyValue NVARCHAR(MAX) = 'Hello, World, Hello, Planet';
    SELECT MyString = STUFF('Hello, World', CHARINDEX(',', @MyValue, 0), 1, ' ');
    Thanks my friends.

    I have a string that looks like this in a column:
    Hello, World, Hello, Planet
    Why doesn't it say Hello Kitty?
    Oh, sorry about that. Anyway:
    SELECT MyString = CASE WHEN CHARINDEX(',', @MyValue, 0) >= 1
                           THEN STUFF(MyString, CHARINDEX(',', @MyValue, 0), 1, ' ')
                           ELSE MyString
                     END;
    Erland Sommarskog, SQL Server MVP, [email protected]
    Erland, love you sense of humor!! :)
    Thanks for the solution.

  • How to get only the first level of nodes for a subform?

    How can we get only the first level of nodes of a subform?
    For ex:
    Form1
         SubForm1
              Text1
              Text2
              RadioButton1
         SubForm2
              Text1
              Text2
              RadioButton1
         SubForm3
              Text1
              Text2
                   SubForm31
                        RadioButton1
    In this heirarchy if we give Form1.nodes will refer to all nodes under the Form1 (SubForm1,Test1,Text2,RadioButton1,SubForm2,...SubForm31, RadioButton1 etc..)
    But is there any way that we can access only the first level of nodes of Form1 ie can we get only (SubForm1,SubForm2,SubForm3) for Form1 in any Way..?
    Thanks.

    Two ways .....
    1. Use Javascript E4X instead ...there are nice functions for getting children of parents.
    2. Cycle through all of the form1.nodes and look for objects that have a className of "subform". For loops are useful for this task.
    Make sense?
    Paul

  • How to return to the first record of a multiple row cursor (Forms 6i)

    Hi all,
    I had a bit of a search through here, but couldn't quite find the answer I'm after.
    I have a multiple row cursor, which I feed into a multi-row block in Forms 6i. I have the following code:
    OPEN CURSOR;
    LOOP
       FETCH CURSOR INTO :FIELD1, :FIELD2, :FIELD3, :FIELD4;
       ... do other code not related with cursor
       EXIT WHEN CURSOR%NOTFOUND;
       NEXT_RECORD;
    END LOOP;Now, I use the Forms built-in NEXT_RECORD to move down through the records on the form and fill in each row from the db. However, once the block loads (this works correctly), the current item (ie where the typing cursor is left) is on the last record.
    Obviously, I need the current item (after loading) to be on the first record. I tried using the Forms built-in FIRST_RECORD after the END LOOP command, but that gives me an ORA-06511 error (An attempt was made to open a cursor that was already open).
    Does anyone know how I might be able to return to the first record of the block correctly?
    Thanks in Advance,
    Chris.

    Ok, I feel like a bit of a dolt.
    I found that all cursors had to be closed before navigating back to the first record.
    Case closed! :)

  • How to map only the first occurance to the op in graphical mapping

    Hi,
    i have a record whose occurance is ' * '.But to the output i need to only map the value of the field which comes in the first occurance of the record.Can anyone help me in this.its very urgent.
    For ex :
    my input is
    <header>
    <inp1>123</inp1>
    <inp2>hello</inp1>
    </header>
    <header>
    <inp1>456</inp1>
    <inp2>hello</inp1>
    </header>
    To the output field <op1> i have to Map ' inp1 ' field but it has to take the value of the first inp1 i.e "123" only always.Any help on how to do this.
    Thanks in advance,
    Bhargav
    Message was edited by:
            bhargav gundabolu

    Hi Raj,
    My inp structure is:
    <header>
    <inp1>123</inp1>
    <inp2>hello</inp1>
    </header>
    <header>
    <inp1>456</inp1>
    <inp2>hello</inp1>
    </header>
    This has to me mapped to the output structure
    <result>
    </op1>
    </result>
    After Mapping inp1 to op1 my structure should appear as
    <result>
    <op1>123</op1>
    </result>
    <result>
    <op1>123</op1>
    </result>
    where <Header> node is mapped to </result>.As <result> has to appear as many times as Header appears.But the <op1> value has to be same as that of the <inp1> of the first <Header>

  • How to remove only the first .Period in a file name using CL.

    Hello!
    So, I've used code similar to this before to remove special characters.  It works for a period . as well, but, of course removes ALL periods.
    file=/Users/niles/Desktop/.test.txt; echo $file"${file//[\\.]/}"
    How do get a reult that only remove the first period . and leaves the rest?
    Thanks!!

    touch .test.txt .t.e.s.t.t.x.t
    # Test it.
    $ for FILE in .test.txt .t.e.s.t.t.x.t
    do
    echo ${FILE} `echo ${FILE} | sed -n 's/^.//p'`
    done
    .test.txt test.txt
    .t.e.s.t.t.x.t t.e.s.t.t.x.t
    # then change the filename.
    $ for FILE in .test.txt .t.e.s.t.t.x.t
    do
    mv ${FILE} `echo ${FILE} | sed -n 's/^.//p'`
    done
    $ ls -l t*
    -rw-r--r--  1 andya  501  0 Apr 23 21:32 t.e.s.t.t.x.t
    -rw-r--r--  1 andya  501  0 Apr 23 21:32 test.txt

  • How to populate only the first record by default when the page opens?

    Dear Members,
    I am using OAF R12 and my requirement is as follows:-
    When the user opens the custom OAF R12 page, I just want to query the first record from the underlying VO.
    For example, If the table has 10 rows, I just want to query the first row as soon as the page opens.
    I have written the below code:-
    Process Request Method of the CO:-_
    am.invokeMethod("initHeaders");
    Code in AM_
    public void initHeaders()
    HeadersVOImpl hVO = getHeadersVO1();
    hVO.initQueryHeaders();
    Code in VO_
    public void initQueryHeaders()
    executeQuery();
    As it is very clear that with the above code all the records will be queried. I have to add something before the executeQuery() method in the VO to just query the first record.
    Can any one please help me by guiding me what I should add before the executeQuery() method in the VO?
    Many thanks in advance.
    Regards,
    R4S.

    Hello Gyan,
    Many thanks for your reply.
    The below line in your code is throwing incompatible type error:
    OARow row = vo.first();
    Can you please help me.
    Regards,
    R4S

  • How to return only the most recent row?

    Hi guys,
    I have a question which I am hoping is not too difficult but I just am not sure how to do it. I need to run a query on a table which may bring back multiple rows for my criteria, however I only want to bring back 1 of these multiple rows and the one I want to bring back has to be the most recent. I do have a date_created column on my table as well as a date_last_updated column. So basically using the select statement below as an example this query could return lets say 5 rows, I however only want it to return the most recent row and the most recent row is determined by the date_last_updated (which will only be populated if the record has been updated otherwise it is null) or the date_created fields.
    select * from my_table
    where model_id = 234
    Any help on this matter would be greatly appreciated.
    Thank you.

    Hi,
    you can do; -
    select *
    from
    (select *
    from my_table
    order by creation_date desc)
    where rownum = 1This does not guarantee that you will get the most recent in cases of records being created at exactly the same time, but if your table has a prime key then you could use this as the order by to get the same effect, though if say 5 records are inserted as a batch what does it really mean to be inserted last....
    regards,
    Robert.
    Edited by: Robert Angel on 09-Jul-2012 08:22 to add code tags.

  • WebService problem: only the first element of a string array is returned

    Hello,
    i did the J2EE QuickCarRental tutorial and extended it by some features: I created another entity bean and implemented four new methods in the QuickOrderProcessor. Then i deployed it as a WebService and accessed it using the Visual Composer.
    Everything works fine except the return value of one WebService method. I created a method with the return value String[]. But the Visual Composer reads it as String. Only the first element of the resulting string array is displayed. Although the test at the web-page http://<server>:<port>/QuickCarRentalService/Config1 displays the whole string array with all its elements. What did i wrong?
    Another problem is that after deploying the J2EE-Application with new WebService methods the changes are not visible inside the visual composer. Although the test at the web-page http://<server>:<port>/QuickCarRentalService/Config1 displays the changes. Do i have to restart the WebService system in the portal content? If yes how can i do that?

    Here are details about setting up and using web services and some examples:
    /people/prakash.darji/blog/2006/10/10/external-web-service-proxy-configuration-for-visual-composer

  • How do I print only the first page of multiple PDF documents?

    I have about 1,500 PDF files (scientific papers) that I need to print only the first page of... Any suggestions on how to do this as a single job or as a few jobs? The files are organized in a bunch of different folders, so if there was some way to do this folder by folder, that would be ok too. Thanks!

    Make sure that in System Preferences Printing & Fax pane you set the default printer to the one you want to use, then put all of these PDF files into their own folder, then open terminal and type the following (without hitting return afterward):
    lpr -o page-ranges="1-1"
    Then drag one of the PDF files into the terminal window (it will add it's path to the end of your command) and replace the file name with *.pdf, so it will look like this:
    lpr -o page-ranges="1-1" /Users/todd/Documents/My\ Folder/*.pdf
    Then hit return.

  • On my iPad 3, how do I make calendar items lasting more than one day appear as such on the monthly view of my calendar? Right now only the first day of the item appears.

    On iPad 3, all of my calendar items lasting more than one day do not appear correctly when looking at the monthly view of the calendar; only the first day of the appointment appears. For example, if I am taking a vacation for 4 days, only the first day of the vacation is marked on the calendar, instead of being listed on all 4 days. When I look at the weekly view, however, it is correct and is listed on all 4 days. The problem here of course is that at a glance, there is no way to look at my monthly schedule. On my iPhone, everything is correct, regardless of month or week view, so clearly this is an iPad problem I guess? Please advise on how this can be corrected. Thank you!

    Unfortunately you can't do what you want. Many people have complained to Apple about this. I suggest you provide Apple feedback directly at http://www.apple.com/feedback/macosx.html. They will not provide a direct response but hopefully if enough people provide feedback Apple will fix this.

  • How do you download all chapters of a video at once?  I purchased a yoga video with multiple chapters and only the first one loaded.  It says I can't download another chapter for 90 days.

    I purchased a yoga video with multiple chapters and only the first one loaded.  It says I can't download another chapter for 90 days.  How do I get all chapters to download?

    Once a device or computer is associated with your Apple ID, you cannot associate that device or computer with another Apple ID for 90 days.
    http://support.apple.com/kb/ht4627

  • Lately when I do an images search only the first page actually shows the images- the rest show blank squares- why, and how do I fix it?

    Over the last week I have noticed more and more that my searches do not show up properly. Today only the first page of images actually show, the rest are blank spaces, but if I click they go to the image site. The rollover does not show either.
    What can cause this, and how do I fix it? I have tried various safe settings but this has no eefect at all.
    Thanks.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • Only the first page is printed reduced as setup. All pages afterward are full size with information cut off. Recent problem. Can print from Safari just fine. How can I get all pages to be reduced size?

    Question
    Printing internet pages
    Reduced print size
    Only the first page is reduced and printed as desired
    All pages after the first page are full size with information cut off
    Recent problem never seen before
    Can print from Safari and other software just fine
    How can I get all pages to be reduced size?

    One suggestion worked from the Firefox prints incorrectly link mentioned above by mha007. I'm thrilled since this has been annoying me for weeks. Thanks mha007!
    Reset all Firefox printer settings
    # Open your profile folder:
    # On the menu bar, click on the Help menu and select Troubleshooting Information. The Troubleshooting Information tab will open.
    # Under the Application Basics section, click on Show in Finder. A window with your profile folder will open.
    # Note: If you are unable to open or use Firefox, follow the instructions in Finding your profile without opening Firefox.
    # On the menu bar, click on the Firefox menu and select Quit Firefox.
    # In your profile folder, copy the prefs.js file to another folder to make a backup of it.
    # Open the original prefs.js file in a text editor (such as TextEdit).
    # Remove all lines in prefs.js that start with print. and save the file.
    # If something goes wrong when you open Firefox, close it again and overwrite prefs.js with the backup you made.

Maybe you are looking for

  • How do I open a document sent to me via EchoSign.  Can I disable it as an option for forms sent out?

    I created a form in LiveCycle and saved as an PDF.  75% of respondents filled out the PDF, saved it, and returned it as an attachment. The ones returned via EchoSign are ALL BLANK.  Can I disable it as an option for forms I send out?

  • Can I use the Speakers AirPlay Philips DS3880W with the new iPod and the new iPad?

    First, I´m Spanish so I can be bad writing in English!! I want to buy the Speaker AirPlay Philips DS3880W and I have got the new iPad and the new iPod, in the compatibility, in the information of the speaker, I can´t see them. Why? Althrought the sof

  • Area for selecting text

    Hello, I am looking for something like a text area where text will be selected when clicked on it. Suppose I have a lunchroom: On my system I have a panel with several products that people can order. When I click on a product, I want that in another

  • Error in UWL configuration for MSS in portal..

    HI, I want to configure UWL in portal so that I can see/approve  leave in UWL in MSS. Please let me know how to configure the same. When I am trying to configure the UWL in system admin> system configuration> Univerasal Worklist Administration, under

  • Classic App "Seen" as UNIX Exec file

    I have a "classic" database program I use. It's kind is listed as a UNIX executable file rather than the program itself. What can I do to change it so it will launch in Classic environment? iMac 600 Mhz Power PC G3   Mac OS X (10.4.8)   classic 9.2