How to concatenate two strings

Hi all

I have two Xml String

<? REQUISITION_NUMBER? > and <? LINE_NO? > and values like this req_no-13091 and Line_no-2

So how do you concatenate like this 13091-2

I tried likethis <? REQUISITION_NUMBER | » -'|| LINE_NO? >

But it gives error

Thanks and greetings
Srikkanth

You can use

Tags: Business Intelligence

Similar Questions

  • How to concatenate the string with a digital command?

    Hello

    How to concatenate the string with a digital command?

    Thank you.

    I think I forgot to add the semicolon, what you can do is, drag the CONCATENATE function and add semicolon.

  • How to compare two strings in PL/SQL

    Hi all
    I need to compare two strings, they are equal or not in PL/SQL. Y at - it a function to compare the strings.

    Yes, the sign =.

    You're after something like:

    IF v_string1 = v_string2 THEN
      ...
    ELSE
      ...
    END IF;
    

    ?

    Published by: Boneist on August 27, 2009 11:41

  • How to concatenate the string of normal worksheet to srting

    Hello

    I try to concatenate string worksheet to sring normal, but she cannot concatenate... here, I have attached my program for your firm .the support cannot be CONCATENATE.

    Hello

    Your channel is get concatenated but is getting added to the new line. If you exapnd your channel indicator, you can see ")" in the new line.

    Remove the \n character and you will get the desired output.

  • How to get two strings to write to a text file

    As requested above.

    Attached is the peak of the problem I have

    Thank you

    Sorry I'm new to Labview

    Concatenate string

    Please take the free tutorials or categories of LabVIEW (free with purchase). It's Basic.

  • How to concatenate two sql statements?

    Hello

    How can I combine the following two sql statements so that the result of a line of the first statement appears before the lines of my second sql statement. The reason I need it is to order the lines correctly.

    Select the username, id
    some abusers
    where id = 0

    Select the username, id
    some abusers
    where id! = 0
    order by username

    Thank you
    j

    You should ask in the forum of the Apex:
    Oracle Application Express (APEX)

    Nicolas.

  • How to create two string of digits of a loop counter I have?

    Hello

    I have a loop that loops 20 times (1.20) with the numeric variable I.

    Now, I want to use this to create a switchingpath - but here I need channel "01" instead of just "1".

    So, I can not only use str (i)

    How can I create the prefix 0 for i 1.9?

    Thank you

    Str (Locals.i, "%.2d")

  • concatenate the strings comand...

    sHello,

    I must repeat that channels below a large part of the time (ON SQL MORE);

    Now I do with comand of copying and pasting each string, but it is very unconfortable.

    How to concatenate the string in a string only, or max 2 strings?

    .. .so I need that I copy/past comand to do all operations of this...

    COMNAD STRING:

    create user Patrick identified by loan;

    Grant connect, create session, imp_full_database to Patrick;

    GRANT to CREATE ANY WORK to Patrick;

    modify user quota unlimited Patrick on the SYSTEM;

    grant unlimited tablespace to mx;

    THANKS FOR HELP

    sqlplus command line allows you to paste together multiple orders (lines) and it then executes sequentially.

    Hemant K Collette

  • How do to concatenate the strings having single quote and ampersand

    Hi all

    I have a task to concatenate two columns under SID - SNAME.

    Input parameter is: sid. We can pass multiple parameters: sid

    CREATE TABLE TABLE1 (NUMBER SID, SNAME VARCHAR2 (100));

    Insert into TABLE1 (SID, SNAME) values (1, 'SURF UP');

    Insert into TABLE1 (SID, SNAME) values (2, 'GNLV STYLE & KEY');

    Insert into TABLE1 (SID, SNAME) values (3, 'ESSENTIALS NORTH & SOUTH');

    Insert into TABLE1 (SID, SNAME) values (4, "Of Ora");

    Select * from TABLE1;

    SID SNAME
    1Of THE SURF's UP
    2KEY & GNLV STYLE
    3ESSENTIALS NORTH & SOUTH
    4ORA

    Expected results

    1. with the setting entry: sid in (1,2)

    Output: 1 - SURF to the TOP, 2 - GNLV STYLE & KEY

    2. with the setting entry: sid in (1,2,3,4)

    Output: 1 - SURF to the TOP, 2 - GNLV STYLE & KEY, 3 - ESSENTIALS NORTH & SOUTH, 4 - ora

    I tried to use the below query,

    Select (select RTRIM (xmlagg (xmlelement (c, sid |')))) -' || SNAME | (",")) .extract ('/ / text()'), ',')

    AS concatenated FROM table1 where «,» | : para. ',' like '%', | SID | %') as double concat;

    What I get for output is as below:

    1 SURF & apos; S upwards, 2 - GNLV STYLE & amp; TREND

    I'm not handling apstrophe and ampersand correctly.

    Can you please help me.

    Thank you

    What I get for output is as below:

    1 - SURF to the TOP, 2 - GNLV STYLE & TREND

    I'm not handling apstrophe and ampersand correctly.

    Yes. This is what happens when you use a method that is not understood.

    The answer to your question is dependent on the version and already well covered in the FAQ.

    See 'Channel aggregation' in Re: 4. How can I convert rows to columns?

    If you are on 11.2 and beyond, use LISTAGG function.

    Regarding your present attempt, since you are extracting text() nodes on an aggregate of XMLType, the result is still a valid XMLType and therefore shows the XML characters reserved in their forms with escape sequence.

    If you want to stick with the XML approach, from 11.1, is the right way to handle this situation:

    SQL> select rtrim(
      2           xmlcast(
      3             xmlagg(
      4               xmlelement(e, sid ||' - '||sname||',')
      5             )
      6             as varchar2(4000)
      7           )
      8         , ','
      9         ) as concatenated
    10  from table1
    11  where ',' || '1,2,3' || ',' like '%,'|| sid || ',%' ;
    
    CONCATENATED
    --------------------------------------------------------------------------------
    1 - SURF'S UP,2 - GNLV STYLE & KEY,3 - ESSENTIALS NORTH & SOUTH
    

    In earlier versions, use either:

    select rtrim(
             dbms_xmlgen.convert(
               extract(
                 xmlagg(
                   xmlelement(e, sid ||' - '||sname||',')
                 )
               , '//text()'
               ).getstringval()
             , 1
             )
           , ','
           ) as concatenated
    from table1
    where ',' || :para || ',' like '%,'|| sid || ',%' ;
    

    Mun

    select rtrim(
             utl_i18n.unescape_reference(
               extract(
                 xmlagg(
                   xmlelement(e, sid ||' - '||sname||',')
                 )
               , '//text()'
               ).getstringval()
             )
           , ','
           ) as concatenated
    from table1
    where ',' || :para || ',' like '%,'|| sid || ',%' ;
    
  • How to extract the same part of the substring of two strings?

    How can I retrieve the first identical substring of two strings?
    version: 10 gr 2
    as for example:
    Given:
    str1: randomStringWith123abc
    str2: randomStringfor345abc
    
    Get:
    substr:randomString
    
    Given:
    str3: dummyhowareu
    str4: dummyiamfine
    
    Get:
    substr:dummy
    As you can see, the size of the substring is unknown.

    any ideas?

    Hello

    something like this:

    with x as (select 'dummyhowareu' str1, 'dummyiamfine' str2 from dual)
    select replace(str1,ltrim(str1,str2))
    from x
    

    Herald tiomela
    http://htendam.WordPress.com

  • Can anyone tell how to insert a string between the two another string...?

    Can anyone tell how to insert a string between the two another string...?
    For example: String1 = 'ABC '.
    String2 = "XY".

    I want that the chain of output like "AXYBC".

    If you have the Position where you want to place your chain, this might work:

    SQL> r
      1  declare
      2    vStr1 varchar2(20) := '123456789';
      3    vStr2 varchar2(20) := 'aa';
      4    nInsertPos number := 3;
      5    vResult varchar2(20);
      6  begin
      7    vResult := substr(vStr1, 0, nInsertPos) || vStr2 || substr(vStr1, nInsertPos+1);
      8    dbms_output.put_line(vResult);
      9* end;
    123aa456789
    

    If you want to insert it after a special character, you can search for the position of your character with the help of instr

    concerning

  • Newbie question - how to concatenate in EQL?

    Sorry for this question but the answer is beyond me in documentation and examples. How do concatenate you two attributes in EQL?

    I looked at https://wikis.oracle.com/display/endecainformationdiscovery/Endeca+Query+Language+%28EQL%29, but there's not much info here. Is there somewhere online documentation EQL?

    Thank you

    Currently, string concatenation is not supported in EQL. You must perform this concatenation in the ETL by creating a new attribute for the concatenated value. (for example YEAR_MONTH_FIELD = YYYY-MM)

  • trigger to concatenate two fields in a table

    Hello

    I'm trying to concatenate two columns in a table and add to the third column in the same table, all the columns are
    numbers, I want to write a trigger that is after insertion to do this... does anyone know how its done...

    Thank you very much
    Jessica

    Hi, Jessica,.

    Welcome to the forum!

    Do you really need to store this concatenation? How you get these results in a normalized database is to store the numbers separately and comnbine them, when necessary, in the queries and reports. You can use a view to avoid repeating the same coiding over and over again.

    If you really want to store the value, use a trigger INSERT or UPDATE BEFORE , like this:

    CREATE OR REPLACE TRIGGER     table_x_biu
    BEFORE     INSERT OR UPDATE
    ON     table_x
    FOR EACH ROW
    BEGIN
         :NEW.column_3 := TO_CHAR (:NEW.column_1)
                    || '-'
                    || TO_CHAR (:NEW.column_2);
    END;
    

    I'm confused about your specific needs. Concatentaion is possible for strings.
    If colonne_1 and column_2 are numbers, the trigger above will make string versions of these numbers, concatenate them (with a hyphen between them), and put the results in the column VARCHAR2 column_3.
    So after this statement:

    INSERT INTO  table_x (column_1, column_2, column_3)
           VALUES          (1,     2,       '9-8');
    

    the new line will have column_3 = 1-2» (In this case, there is no point in explicitly implemented column_3, because the shutter always sets the value based entirely on colonne_1 and column_2.)

    If you need more information, post CREATE TABLE, INSERT and UPDATE statements and that you want the table to contain after each INSERT or UPDATE.

  • How to concatenate files of CT in DiaDem

    I saw the post on how to concatenate CSV files on tiara... but how do concatenate you files TDM together?

    I am surprised that this feature is not built into the software as it is a fairly common task, and the script is probably beyond the capacity of most of the user to maintain.

    Hello Colin,

    There are several examples that you can use to concatenate the data channels in DIAdem.

    This one is on the site:

    http://sine.NI.com/DevZone/CDA/EPD/p/ID/3870

    Another good example is included in the tiara and accessible from the help > menu examples. From there on, drill down to the folder: "examples > scripting > Scripts > add channels to each other.

    Between these two examples, we should hopefully take care of your issue.

    Best regards

    Otmar

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    

Maybe you are looking for