Concat vs ||

Hi,
i am writing a some queries in SP which form dynamically. i do a lot of concatenation among strings and also numbers to prepare these queries.
can somebody tell me that which approach is better to use in terms of performance.
select concat(str,'popo') into str from dual ;
or
str:= str || 'popo';

Although I agree with the most of the comments here, there will be a performance diference between the two statements in your original post.
The first
SELECT concat(str, 'popo') INTO str FROM dual;requires a context switch from PL/SQL to the SQL engine, and will be slower than the direct assignment. As far as I can tell, there is no difference between a direct assignment using CONCAT and the || operator.
The following test shows that if you are going to do a lot of concatenation in a LOOP, then don't use SELECT INTO (good advice for almost anything in PL/SQL).
SQL> DECLARE
  2     l_str   VARCHAR2(15);
  3     l_start NUMBER;
  4     l_end   NUMBER;
  5     l_elap  NUMBER;
  6  BEGIN
  7     l_start := DBMS_UTILITY.Get_Time();
  8     FOR i IN 1 .. 10000 LOOP
  9        l_str := 'HELLO';
10        SELECT CONCAT(l_str, ' WORLD') INTO l_str
11        FROM dual;
12     END LOOP;
13     l_end := DBMS_UTILITY.Get_Time();
14     l_elap := l_end - l_start;
15     DBMS_OUTPUT.Put_Line('Select used '||l_elap||' centi seconds');
16
17     l_start := DBMS_UTILITY.Get_Time();
18     FOR i IN 1 .. 10000 LOOP
19        l_str := 'HELLO';
20        l_str := CONCAT(l_str, ' WORLD');
21     END LOOP;
22     l_end := DBMS_UTILITY.Get_Time();
23     l_elap := l_end - l_start;
24     DBMS_OUTPUT.Put_Line('Assign CONCAT '||l_elap||' centi seconds');
25
26     l_start := DBMS_UTILITY.Get_Time();
27     FOR i IN 1 .. 10000 LOOP
28        l_str := 'HELLO';
29        l_str := l_str || ' WORLD';
30     END LOOP;
31     l_end := DBMS_UTILITY.Get_Time();
32     l_elap := l_end - l_start;
33     DBMS_OUTPUT.Put_Line('Operator used '||l_elap||' centi seconds');
34  END;
35  /
Select used 96 centi seconds
Assign CONCAT 0 centi seconds
Operator used 1 centi seconds
PL/SQL procedure successfully completed.TTFN
John

Similar Messages

  • How to concat detail records in one line

    Hi,
    I would like to concat all empoyees and it as column next to department name, like that
    DEPTNO DEPTNAMR EMPLIST
    Is there any way to do it using select without user-define function to concat emp records
    Im using O10R2
    Thanks & best regard

    Take your pick, these examples span several database versions:
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

  • How to use Special Characters in CONCAT function or another form with Xquer

    Hello everyone
    I'm using PS3 OEPE within message flow (proxy)and I'm using Xquery.
    I'm using the CONCAT function, but this does not allow me to concatenate special characters not allowed, for example:
    I want to concatenate these strings:
    String1 = “<get-person><id-person&;gt;”
    String2 = “123”
    String3 = “</id-person&;gt; </get-person>”
    I want to represent characters regex. It means no XML characters
    Someone knows some way, any function that allows me to concatenate in OSB these values with Xquery?
    Edited by: chromosoma on Sep 5, 2012 5:59 PM

    Hi,
    It seems to me you're doing things in the most complicated way possible...
    Firstly, you should use codepoints-to-string not the reverse... Secondly, the function work with decimals, not hexa
    http://www.xqueryfunctions.com/xq/fn_codepoints-to-string.html
    http://www.xqueryfunctions.com/xq/fn_string-to-codepoints.html
    This works...
    concat(codepoints-to-string(38),'lt',codepoints-to-string(59),'get-person')But this also works... Note that I've inserted a space between the & and the lt so the forum formatting can show it...
    let
    $String1 := "& lt;get-person& gt;& lt;id-person& gt;",
    $String2 := "123",
    $String3 := "& lt;/id-person& gt;& lt;/get-person& gt;"
    return
         concat($String1,$String2,$String3)And, finally this also works... So what's the reason for escaping < and > with &lt and > and why codepoints?
    let
    $String1 := "<get-person><id-person>",
    $String2 := "123",
    $String3 := "</id-person></get-person>"
    return
         concat($String1,$String2,$String3)Cheers,
    Vlad

  • XSLT concat() problem.

    Help guys, this XSLT is getting me down!
    Im quite simply trying to take a string, and replace tabs with 4 non-breaking space characters.
    Can someone please explain to me why the following template doesnt work? It should take in a string, perform the replacement in a recursive fashion, and finally print it out.
    Any help is greatly appreciated.
    Cheers,
    Lee.
         <xsl:template name="substitute">
              <xsl:param name="string" />
              <xsl:param name="from" select="'&#9;'" />
              <xsl:param name="to">
                   &#160;&#160;&#160;&#160;
              </xsl:param>
              <xsl:choose>
                   <xsl:when test="contains($string, $from)">                    
                        <xsl:call-template name="substitute">                         
                             <xsl:with-param name="string" select="concat(substring-before($string, $from), $to, substring-after($string, $from))" />
                             <xsl:with-param name="from" select="$from" />
                             <xsl:with-param name="to" select="$to" />
                        </xsl:call-template>
                   </xsl:when>
              <xsl:otherwise>
                   NO MORE SUBSTITUTION REQUIRED - FINAL STRING IS : <xsl:value-of select="$string"/>
              </xsl:otherwise>
              </xsl:choose>
         </xsl:template>

    Help guys, this XSLT is getting me down!
    Im quite simply trying to take a string, and replace
    tabs with 4 non-breaking space characters.
    Can someone please explain to me why the following
    template doesnt work? It should take in a string,
    perform the replacement in a recursive fashion, and
    finally print it out.
    Any help is greatly appreciated.
    Cheers,
    Lee.
         <xsl:template name="substitute">
              <xsl:param name="string" />
              <xsl:param name="from" select="'     '" />
              <xsl:param name="to">
                   ����
              </xsl:param>
              <xsl:choose>
                   <xsl:when test="contains($string, $from)">                    
                        <xsl:call-template name="substitute">                         
    <xsl:with-param name="string"
    ing" select="concat(substring-before($string, $from),
    $to, substring-after($string, $from))" />
                             <xsl:with-param name="from" select="$from" />
                             <xsl:with-param name="to" select="$to" />
                        </xsl:call-template>
                   </xsl:when>
              <xsl:otherwise>
    NO MORE SUBSTITUTION REQUIRED - FINAL STRING IS :
    : <xsl:value-of select="$string"/>
              </xsl:otherwise>
              </xsl:choose>
         </xsl:template>
    It is not concat() problem, it is a recursion problem -- too many recursive calls.
    I wouldn't recommand using recursion in XSL, yeah, it works, but you can't increase the stack size without restarting the JVM...
    anyway, you can use translate function to do replacing, also you can call a java extension method to do string replacement. it is cleaner anyway and more efficient anyway.

  • SQL ERROR of "CONCAT is not a recognized built-in function name in SQL"

    Normally the function of "CONCAT( )" is used in SQL to combine two strings together. 
    In SAP B1, however, you get the error message in the Subject line above when you try to use it and there is not much help there as to what to do.  The solution is so simple you are going to fall over. I have had so many questions about this one function and several folks have asked me to post this, as they spent hours going through various permutations with no success. 
    If you have had experience with some other SQL than what is in SAP B1, the following puts the city name and state name from the CRD1 table into one string in the final results:
    <b>CONCAT(T0.City, '  ', T0.State) AS ‘Combined City and State’,</b>
    BUT in SAP B1, the above will error out...so what do you do?
    Get down to the real basics and use the plus sign.  Go ahead, try it:
    <b>(T0.City + ' ' + T0.State) AS 'Combined City and State',</b>
    Note that the single quotation marks have a space between them to give you space between the city name and the state name...you could put a comma and a space between the single quotation marks, if you want to.
    Can you believe what a simple solution that is? I have pages full of this stuff from where the SQL gives you a message and no resolution...
    OK - Huy, Krisha, John, and Charles - I have no idea if it will help anyone or not, but I promised you I would post...so there it is...pass it on to your compatriots!
    Thanks all - Zal

    OK Suda - maybe I was not too clear...sorry.  Now to your points...
    WHY:
    "CONCAT ( )" is a very common operation command in other SQL I have used and studied. Most folks having experience in SQL would think this is a "standard" operative.  When folks are new to SAP B1 and they try to use "CONCAT ( )", they get the error message as shown in the Subject line.
    WHERE YOU GET MESSAGE:
    You get the error message in the Query Window where you type in/change SQL  and after you have executed the query.  Error messages appear at the very bottom of the Query Window in red.  The words in the Subject line are part of an exact copy from that line.
    APPLYING THE QUERY:
    When I hold instruction on SQL, I give exercises for folks to do.  This was nothing more than part of an exercise to demonstrate how one can combine two fields in one column in a query and how it comes out on a report (we combine other fields in the same "address" exercise to create "labels" using the Print Layout Designer).  I know, nothing very earth shattering, but each training script I create has ONE specific objective since the scripts I write are for users and some might have experience from other packages.
    WITH OR WITHOUT PARENTHESIS:
    Thanks - yes, it also works without parenthesis.
    But when someone is new to SQL, the lengthy "one-liner" created by the SAP B1 Query Generator can be a bit difficult to read so I have developed a writing and format standard to make reading the SQL easier by breaking it up. The format standard also makes it easier to draw attention to one particular line on an overhead and for the student to write comments or notes on the page.  But one writing standard is that the students use parenthesis after a particular command [for example, SUM( ), MIN ( ), MAX( ), AVG( ), etc].  It might be seen as useless for experienced persons, but I have found that folks can "get it" better when you give them small rules like this one.  If you want to see a bit more of that standard, there is another item (titled Reconciliation by a person named Shwu?) somewhere on the forum where I laid out an entire SQL for pre-upgrade reconciliation.  I tend to document A LOT since I am writing SQL for several clients and sometimes refer back to old ones.  The standard might be funky, and maybe someone else has a better way, but heck - it works for me!
    Thanks for pointing out where I was a bit confusing in the original message.  I don't know how these Reward Points work, but consider yourself getting a "Z" point for those "S" points in your message.
    Take care - Zal

  • SQL Concat function seem not to work properly in SQL query data model. BIP 11g

    I try to use this function to show entire name CONCAT(name, ' ', surname) and it doesnt show the surname. it looks like it only tooks 2 arguments. I use it with the option "Add element by expression" within a SQL Query - Data set.
    Lucia

    i don't believe you
    please post more info, may be screen or sql or some more useful statement
    CONCAT(name, ' ', surname) and it doesnt show the surname
    may be because for some case "surname" is empty  or may be you incorrect use concat function
    one way mentioned by BluShadow is " || " operator  - http://docs.oracle.com/cd/B28359_01/server.111/b28286/operators003.htm#SQLRF51156
    and another is concat function http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions026.htm#SQLRF00619
    so for your case it can be like
    CONCAT(CONCAT(name, ' '), surname)

  • Is this a CONCAT problem re: David Powers, or a Magic Quotes problem...

    I've tried to figure this out with the posts (and some info
    on David's site, etc), and I just can't seem to figure out the real
    problem.
    I'm working on a tutorial and I can't figure out if the error
    message is correct and it's improper coding inserted by DW (and if
    so, I can't figure out what to correct) or
    If this is a problem with DW8.0.2 along the lines of what the
    hotfix that seems to be so hard to get will fix, or
    If this is along the lines of an example of why magic quotes
    should be turned off, and if so, where/how do I turn them off, and
    will that correct the code, and if not, how would it be properly
    corrected?
    Here is the error message:
    Parse Error: parse error, unexpected '=', expecting ',' or
    ')' in <thefile> on line 34.
    Here is the code it is referencing:
    32 $Search_rsSearch = "abc";
    33 if (isset(#txtSearch#)) {
    34 $Search_rsSearch = (get_magic_quotes_gpc()) ? #txtSearch#
    : addslashes(#txtSearch#);
    35 }
    36 mysql_select_db($database_dorknozzle, $dorknozzle);
    37 $query_rsSearch = sprintf("SELECT * FROM EmployeeStore
    WHERE ItemName LIKE CONCAT('%%', %s,
    '%%')", GetSQLValueString($Search_rsSearch, "text"));
    38 $rsSearch = mysql_query($query_rsSearch, $dorknozzle) or
    die(mysql_error());
    39 $row_rsSearch = mysql_fetch_assoc($rsSearch);
    40 $totalRows_rsSearch = mysql_num_rows($rsSearch);
    I'm using php4.4.4, mysql5.0.24, apache2.2.3
    Thank You,
    Jeff G.

    xViPERed wrote:
    > If this is a problem with DW8.0.2 along the lines of
    what the hotfix that
    > seems to be so hard to get will fix,
    That will fix part of your problem, but the error is caused
    by something
    else:
    > Here is the error message:
    >
    Parse Error: parse error, unexpected '=', expecting ',' or
    ')' in
    > <thefile> on line 34.
    >
    > Here is the code it is referencing:
    > 32 $Search_rsSearch = "abc";
    > 33 if (isset(#txtSearch#)) {
    > 34 $Search_rsSearch = (get_magic_quotes_gpc()) ?
    #txtSearch# :
    > addslashes(#txtSearch#);
    > 35 }
    # is one of the PHP characters used to comment out part of a
    script. I
    suspect that you have got this from the Dreamweaver help
    files, which
    are particularly unhelpful on this point. The show the
    runtime value
    expression as #formFieldName#, which is ColdFusion style, not
    PHP. You
    need to replace #txtSearch# with something like
    $_GET['search'] or
    $_POST['search'].
    What makes things worse is that the code inserted by 8.0.2
    without the
    hotfix is also incorrect. Line 34 should be something like
    this:
    $Search_rsSearch = $_GET['search'];
    Line 37 is also wrong.
    > 37 $query_rsSearch = sprintf("SELECT * FROM
    EmployeeStore WHERE ItemName LIKE
    > CONCAT('%%', %s,
    > '%%')", GetSQLValueString($Search_rsSearch, "text"));
    It should be this:
    $query_rsSearch = sprintf("SELECT * FROM EmployeeStore WHERE
    ItemName
    LIKE %s", GetSQLValueString("%" . $Search_rsSearch . "%",
    "text"));
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • How to concat multiple text files to a single file??

    Hi, guys .. This may be a simple question for you but quite headache for me...
    I got files:
    c:\text1.txt
    c:\text2.txt
    c:\text3.txt
    and I wanna concat them to a single file and stored as
    c:\txt\text123.txt
    How do I achieve it? Thanks a lot!
    yours, SD

    Hello,
    The following code is a straightforward way of doing it. You can read directly from file1, file2, file3 withouth using the buffered stream, but the buffered streams are more efficient.
    java.io.File f1 = new java.io.File("c:/text1.txt");
    java.io.FileInputStream file1 = new java.io.FileInputStream(f1);
    java.io.BufferedInputStream input1 = new java.io.BufferedInputStream(file1);
    java.io.File f2 = new java.io.File("c:/text2.txt");
    java.io.FileInputStream file2 = new java.io.FileInputStream(f2);
    java.io.BufferedInputStream input2 = new java.io.BufferedInputStream(file2);
    java.io.File f3 = new java.io.File("c:/text3.txt");
    java.io.FileInputStream file3 = new java.io.FileInputStream(f3);
    java.io.BufferedInputStream input3 = new java.io.BufferedInputStream(file3);
    java.io.File f = new java.io.File("c:/text123.txt");
    java.io.FileOutputStream out = new java.io.FileOutputStream(f);
    int ch = input1.read();
    while (ch >= 0){
    out.write(ch);
    ch = input1.read();
    ch = input2.read();
    while (ch >= 0){
    out.write(ch);
    ch = input2.read();
    ch = input3.read();
    while (ch >= 0){
    out.write(ch);
    ch = input3.read();

  • Concat multiple values in a queue

    Hello,
    I have the following problem in message mapping:
    I have one target element and several values of a source structure which I collect using an If / then function. Afterwards I remove all contexts.
    What I want to do now is to concat the remaining values to be filled to a single target element.
    For example there are three values left in the queue (without a context change in between) and I would like to have all of them in a single field (separated by a blank).
    Using the concat function it does not work of course as the exact number of elements is determined during runtime.
    Is it possible to do this with standard functions or do I need to apply an advanced UDF?
    Thanks for your advice.

    Hi,
    Here is the UDF code for the same..
    While creating Advance UDF you have to select Cache as Context.
    String output = "" ;
    for( int i = 0; i< a.length; i++ )
    output =  output + a<i>;
    if ( i != a.length - 1 )
      output  = output + " " ;
    result.addValue(output);
    Regards,
    Sarvesh

  • For Each function for a Concat Value

    Hi:
    The scenario is, we need to concat two unbounded elements and map it to a target element using for each functionality.
    For example
    <BookStore>
    <Books>
    <Name>NAME1</Name>
    <Author>AUTHOR1</Author>
    <BookId>1</BookId>
    <Quantity>2</Quantity>
    <Price></Price>
    <Status></Status>
    <Books>
    <Books>
    <Name>NAME2</Name>
    <Author>AUTHOR2</Author>
    <BookId>2</BookId>
    <Quantity>2</Quantity>
    <Price></Price>
    <Status></Status>
    <Books>
    </BookStore>
    I need to concat "Name" and "Author" which is under the unbounded element "BookStore" and map it to a single element called "Sample" on the Target side.
    I am not able to use the "for-each" XSLT function to get the multiple value of Name and Author since concat function is used. Is there any other way to concat and get the multiple values of the element "Name" and "Author"?
    Regards
    RK

    Hi Vlad:
    Ok i use for-each function in my XSLT to get the vlaues of unbounded elements
    eg:
    <xsl:for-each select="/BookStore/Books/Name">
    <request:Sample>
    <xsl:value-of select="/BookStore/Books/Name"/>
    </request:Sample>
    </xsl:for-each>
    This works perfectly fine and whenever there is a multiple vlaue for Name it is mapped to Sample and output comes as expected
    <Sample>NAME1</Sample>
    <Sample>NAME2</Sample>
    Now i need to concat the Name and Author and pass the value to element on the target. Since name and author occuring multiple times, i am not sure how to pass the values to the element on the target

  • Mapping question - concat two nodes

    hi all,
    i need to map a node with many occurrencies to a node with only one ocurrency, and i need to concat all the values from the source node into the target node.
    example:
    <delivery> 1..unbounded      -->       <data> 0..1
    <delivery> "this is "
    <delivery> "an example"
    result
    <data> "this is an example"
    does anybody know how can i solve this qestion?
    thanks in advanced.
    regards, Fabian

    Hi,
    Go for UDF...
    pass the source data as queue input to the UDF(i.e array)..in that udf loop over the source input and do concat inside the loop and pass the final result to the target element...
    string target = "";
    for(int i =0 ;i<input.length;i++)
    target = target + input<i>;
    if there are multiple contexts in this then need to handle the same
    HTH
    Rajesh

  • Iif and concat problem in email body - solution

    Hi all, it is not a question, just some information if somebody will try to do it:
    If you want to send an email from workflow and use the IIf function with concatenated results, the concat syntax in the help will not work.
    The solution is: Use + character in place of || and so on :)
    For exlampe:
    %%%IIf(PRE('<dDate_field1_ITAG>')<>[<dDate_field1_ITAG>],'Any text '+PRE('<dDate_field1_ITAG>')+'-->'+[<dDate_field1_ITAG>], '')%%%
    The result when the field HAD a value and it is changing to another: Any text 11/11/2011 --> 12/11/2011
    If the field is changing from NULL to something, use this:
    %%%IIf(IfNull(PRE('<dDate_field1_ITAG>'),0)<>[<dDate_field1_ITAG>],'Any text'+PRE('<dDate_field1_ITAG>')+'-->'+[<dDate_field1_ITAG>], '')%%%
    And if U want to see the every change (null -> value, value -> value, and value -> null), use this beauty:
    %%%IIf(IfNull(PRE('<dDate_field1_ITAG>'),0)<>[<dDate_field1_ITAG>] OR ([<dDate_field1_ITAG>] IS NULL AND PRE('<dDate_field1_ITAG>') IS NOT NULL),'Any text'+PRE('<dDate_field1_ITAG>')+'-->'+[<dDate_field1_ITAG>], '')%%%
    Regards,
    A.

    >
    my problem is my email body is
    please clik on this link www.gmail.com
    iii am concating the text please clik on this link ||' '||www.gmail.com
    but in email www.gmail.com is shown on text only.Correct. As the e-mail body is in text/plain MIME format.
    If you want to use formatting in the e-mail body, you need to create a text/html body. At [RFC FAQs|http://www.faqs.org/rfcs/rfc-titles.html], refer to the following RFCs:
    - RFC 2049 - Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples
    - RFC 2048 - Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures
    - RFC 2047 - MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text
    - RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types
    - RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
    In simple terms, your e-mail message body needs to look something like this:
    Subject: Test E-mail
    From: "John Doe" <[email protected]>
    To: "Jane Doe" <[email protected]>
    Content-Type: multipart/alternative; boundary="=-2zP89iYM0w6fRrmCDsDv"
    Mime-Version: 1.0
    --=-2zP89iYM0w6fRrmCDsDv
    Content-Type: text/plain
    Content-Transfer-Encoding: 7bit
    This is the start of the e-mail message in plain text format.
    blah blah..
    --=-2zP89iYM0w6fRrmCDsDv
    Content-Type: text/html; charset="utf-8"
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
    <html>
    This is the start of the e-mail message in HTML text format.
    </html>
    --=-2zP89iYM0w6fRrmCDsDv--

  • String concat PROBLEM??? Please Help

    I have this strange Question regarding String concat
    If I say:
    String str = "Welcome";
    str.concat(" to Java");
    System.out.println(str);
    The output is: Welcome.
    How do I get the output to Welcome to Java??

    I have this strange Question regarding String concat
    If I say:
    String str = "Welcome";
    str.concat(" to Java");
    System.out.println(str);
    The output is: Welcome.
    How do I get the output to Welcome to Java??
    The problem is that String is immutable, The String you have held in str does not change, rather a new Srtring is returned. So all yo have to do is grab the new String
    str = str.concat("to Java");
    or use the new String without keeping it.
    ie
    System.out.println(str.concat("to Java"));

  • String concat problem

    Hi folks,-
    i know this question might be very simple but i just cannot see what i am doing wrong here.
    String stringA, stringB, stringC;
    stringA= new String();
    stringB= new String();
    stringC= new String();
    stringA = null;
    stringB = "TRUE";
    stringC = "Error:";
    stringA.concat(stringB); // my code stops and quits here w/o error
    // other codewhat is wrong here?
    thanks much

    could you then please explain the following?
    public String concat(String str)Concatenates the
    specified string to the end of this string.
    If the length of the argument string is 0, thenthis
    String object is returned. Otherwise, a new String
    object is created, representing a charactersequence
    that is the concatenation of the charactersequence
    represented by this String object and thecharacter
    sequence represented by the argument string.
    Examples:
    "cares".concat("s") returns "caress"
    "to".concat("get").concat("her") returns"together"
    Parameters:
    tr - the String that is concatenated to the end of
    this String.
    Returns:
    a string that represents the concatenation of this
    object's characters followed by the stringargument's
    characters.
    Throws:
    NullPointerException - if str is null.It returns a new String, which you are
    throwing away. Change your code like this:
    stringA = stringA.concat(stringB);
    and then you'd get somewhere.yes, it makes sense but the description does not say this.
    i think that will work but my problem is with the description of this
    concat operation on the java web site.
    thanks for the help

  • How to concat the data located in ctrl:eventResult and fixed data ?

    I want to concat the data located in ctrl:eventResult and the content of <fixed> ,like the following(it is incorrect):
    <messageTextInput name="name">
    <boundAttribute name="prompt">
    <concat>
    <dataObject select="listName"
    source="ctrl:eventResult"/>
    <fixed text="Hello"/>
    </concat>
    </boundAttribute>
    Thanks.

    I don't see anything wrong with your code - I was able to set up a small test case using it and didn't see any problems with concatenation. Are you certain that you are setting up the EventResult property correctly? Does the following code work?
    <styledText data:text="listName@ctrl:eventResult"/>Can you post your code which creates the EventResult object?
    Andy

  • What is the cause of the XPath error in concat expression

    Hi,
    In a BPEL process I am working on I am building a list as follows -
    <copy>
    <from expression="concat(bpws:getVariableData('FMSNumbersList'),' | ',bpws:getVariableData('Invoke_1_GetFmsHeadersSelect_OutputVariable','FmsWaveAssignCollection','/ns5:FmsWaveAssignCollection/ns5:FmsWaveAssign/ns5:fmsHeadersCollection/ns5:FmsHeaders[bpws:getVariableData('FmsHeadersProcessed')]/ns5:fmsNumber'))"/>
    <to variable="FMSNumbersList"/>
    </copy>
    When I compile the project I get the following error -
    Error(195): invalid xpath expression
    xpath expression "concat(bpws:getVariableData(&apos;FMSNumbersList&apos;),&apos; | &apos;,bpws:getVariableData(&apos;Invoke_1_GetFmsHeadersSelect_OutputVariable&apos;,&apos;FmsWaveAssignCollection&apos;,&apos;/ns5:FmsWaveAssignCollection/ns5:FmsWaveAssign/ns5:fmsHeadersCollection/ns5:FmsHeaders[bpws:getVariableData(&apos;FmsHeadersProcessed&apos;)]/ns5:fmsNumber&apos;))" specified in <from> is not valid, because XPath query syntax error.
    The syntax error occurs while parsing XPath expression concat(bpws:getVariableData('FMSNumbersList'),' | ',bpws:getVariableData('Invoke_1_GetFmsHeadersSelect_OutputVariable','FmsWaveAssignCollection','/ns5:FmsWaveAssignCollection/ns5:FmsWaveAssign/ns5:fmsHeadersCollection/ns5:FmsHeaders[bpws:getVariableData('FmsHeadersProcessed')]/ns5:fmsNumber')), at position 255.
    The XPath query syntax was wrong; the exception was: Expected: ).
    Check the detailed root cause described in the exception message text and verify that the XPath expression named in the error message is correct. The XPath expression is defined in the BPEL process.
    Make sure the expression is valid
    I am unable to figure out what is wrong with the above expression. Can someone please help.
    Thanks in advance
    Harish

    You have to use two copy statement to fetch values like an Array.
    1. Construct a dynamic xpath expression
    2. Use dynmaic xpath to get the array value
    Eg:
    The below code shows how to use assign to build the dynamic XPath.
    <assign name="Assign_XPath_For_Array">
    <copy>
    <from expression="concat('/ns1:ArrayList/ns2:ArrayElem[',bpws:getVariableData('Variable_Index_Counter'),']') "/>
    <to variable="Variable_Xpath"/>
    </copy>
    </assing>
    Note have used [index] to represent index element here in the array.
    Here Variable_Xpath acts as a temporary string variable that holds the intermediate Xpath as string.
    Now use this XPath string Variable while reading array index elements.
    This would look like
    <assign name="Assign_Read_Array">
    <copy>
    <from expression="bpws:getVariableData('Variable_Array','payload',bpws:getVariableData('Variable_Xpath'))"/>
    <to variable="Variable_Read_Array_Element"
    query="/ns1: ABC"/>
    </copy>
    </assign>
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • How do i print over my network

    I have an iMac running 10.6.8 and I would like to print over my newtwork using a hp jetdirect 300x which is attached to a hp 5p lazerjet printer. The windows xp notebook i have works fine through it. I can see a jetdirect socket on the list on my Mac

  • Security Settings and Field Extraction

    Hello, I've run into a bit of a problem in .NET(C#) when trying to automate data extraction from a PDF. Specifically, I get an error stating "The document's security settings prohibit the operation being performed". The security method applied to the

  • How do I download pictures from a disk to iPhotos on my MacBook Pro?

    I am working on an album for a friend whom sent me a disk of photos.  How do I download pictures from the disk to my iPhotos so I can then pick and choose which ones to print?  Thanks!  Cyndy

  • About OEL 5.4 kernel

    Hi, I have tried with OEL5.4.It has 2.6.18 kernel.But higher version 2.6.32 is also available.Is there any specific reason to inlcude lower version?

  • Storing individual resutls(rows) from a query which is run every minute

    Is there a way i can issue a query like select item_desc from item_dtl where track_code='UNPROCESSED'; every 1 minute and permanantly store the results of this query to a table. How would you achieve this?