Concatenate Two Fields Using EQL

I am trying to concatenate two fields my company has in Endeca and am not being able to accomplish this. I have a Call_Num field and a Task_Num field. I would like to combine these fields with a hyphen in between. In the SQL queries I have written, I've been able to do this by typing: Call_Num || '-' || Task_Num. I tried this in EQL and am told that it doesn't recognize the ||. I tried using the keyword Concat (like you do in Excel) - CONCAT(Call_Num, '-', Task_Num), and it didn't recognize that either. I spoke to someone else in my company who uses Endeca and they told me that I need to convert Call_Num and Task_Num to integers (both fields are currently formatted as text - which is what I want, because Task_Num usually starts with a 0), multiply them by 1000 and then add them together. That isn't what I'm looking for either.
I feel like I'm banging my head against a brick wall. I've been working on this simple task for about an hour now and have not met with any success.
Any assistance you can provide would be greatly appreciated.

EQL is for run-time querying, whereas you want the index to contain this as a concatenated property. Either generate this property as a concatenated version in your data feed to Endeca, or add a Record Manipulator to your pipeline of:
<EXPRESSION TYPE="VOID" NAME="CREATE">
<EXPRNODE NAME="PROP_NAME" VALUE="_YourConcatenatedAttribute"/>
<EXPRESSION TYPE="STRING" NAME="CONCAT">
<EXPRESSION TYPE="PROPERTY" NAME="IDENTITY">
<EXPRNODE NAME="PROP_NAME" VALUE="Call_Num"/>
</EXPRESSION>
<EXPRESSION TYPE="STRING" NAME="CONST">
<EXPRNODE NAME="VALUE" VALUE="-"/>
</EXPRESSION>
<EXPRESSION TYPE="PROPERTY" NAME="IDENTITY">
<EXPRNODE NAME="PROP_NAME" VALUE="Task_Num"/>
</EXPRESSION>
</EXPRESSION>
</EXPRESSION>
Define a property in your pipeline and then map "\_YourConcatenatedAttribute" to this (the "_" prefix just reminds you that the source attribute is programmatically generated rather than being the name of a property in your source data). You can then use this concatenated property for any sorting, filtering etc. you want to do.
Michael

Similar Messages

  • How to concatenate two fields CSKS-KOSTL & CSKT-LTXT in BEx Query?

    Hi,
    I have a requirement to concatenate two fields CSKS-KOSTL (Cost Center) and CSKT-LTXT (Cost Center Text) and show them as one field in the BEx query.
    I do not know what to do, so please help me out.
    Thanks in advance.
    Regards
    Harman

    Hi Harman,
    If cost center is a masterdata, it can have its own text..i doubt why do u have 2 different fileds..
    Anyways if its a masterdata object maitaining its own text, then in the query properties under Display tab select Key&Text option this give you both key and text values in the output.
    If its two different fileds then its better to use concatenate in the transformation.
    Regards,
    Geetha

  • Concatenate two fields

    Hi,
      Can anyone let me know how to concatenate the following two fields and use it in the select statement::
    BKPF-AWKEY = MKPF-BELNR + MKPF-MJAHR.
    Please reply at your earliest convenience.
    Thanks,
    Amit.

    hi
    good
    check this example and use accordingly
    DATA: c1(10) TYPE c VALUE  'Sum',
          c2(3)  TYPE c VALUE  'mer',
          c3(5)  TYPE c VALUE  'holi ',
          c4(10) TYPE c VALUE  'day',
          c1 (30) TYPE c,
          sep(3) TYPE c VALUE ' - '.
    CONCATENATE c1 c2 c3 c4 INTO c5.
    WRITE c5.
    CONCATENATE c1 c2 c3 c4 INTO c5 SEPARATED BY sep.
    WRITE / c5.
    The output looks like this:
    Summerholiday
    Sum - mer - holi - day
    In c1 to c5, the trailing blanks are ignored. The separator sep retains them.
    thanks
    mrutyun^

  • Trigger to concatenate two fields in a table

    Hi
    I am trying to concatenate two column in a table and add to the third column in the same table, all the columns are
    numbers, I want to write a trigger which is after insert to do that..does anyone know how its done...
    thanks a lot
    Jessica

    Hi, Jessica,
    Welcome to the forum!
    Do you really need to store this concatenation? The way you would get these results in a normalized database is to store the numbers separately, and comnbine them, when necessary, in queries and reports. You can use use a view to avoid repeating the same coiding over and over.
    If you really want to store the value, use a BEFORE INSERT OR UPDATE trigger, 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 by your exact requirements. Concatentaion can only be done to strings.
    If column_1 and column_2 are NUMBERs, the trigger above will make string versions of those numbers, concatenate them together (with a hyphen between them), and put the results in the VARCHAR2 column column_3.
    So after this statement:
    INSERT INTO  table_x (column_1, column_2, column_3)
           VALUES          (1,     2,       '9-8');the new row will have column_3= '1-2'. (In this case, there is no point in explicitly setting column_3, because the trigger will always set the value based entirely on column_1 and column_2.)
    If you need more help, post CREATE TABLE , INSERT and UPDATE statements, and who what you want the table to contain after each INSERT or UPDATE.

  • Joining Two Fields Into One Field for a View

    I am trying to create a view based off of multiple tables.
    I have all of the joins and everything done nicely and working properly.
    However, when I get to this one step, that's when I start running into problems.
    I just want to join (or concatenate) two fields together with a period character in between them.
    For example, if I take FirstName and LastName, then I want them to become one field called Name, appearing as "JOHN.DOE"
    When I try to join them together, the problem comes up with the period character.
    A sample code of what I have done is here:
    BEGIN
    EXECUTE IMMEDIATE 'create view VIEW_LALALA
    as SELECT t1.FirstName + '.' + t2.LastName as Name, t1.something as Something, t2.ooo as OOO
    FROM (tableFirstNames t1 inner join tableLastNames t2 on t1.nameID = t2.nameID)
    END;

    832667 wrote:
    I am trying to create a view based off of multiple tables.
    I have all of the joins and everything done nicely and working properly.
    However, when I get to this one step, that's when I start running into problems.
    I just want to join (or concatenate) two fields together with a period character in between them.
    For example, if I take FirstName and LastName, then I want them to become one field called Name, appearing as "JOHN.DOE"
    When I try to join them together, the problem comes up with the period character.
    A sample code of what I have done is here:
    BEGIN
    EXECUTE IMMEDIATE 'create view VIEW_LALALA
    as SELECT t1.FirstName + '.' + t2.LastName as Name, t1.something as Something, t2.ooo as OOO
    FROM (tableFirstNames t1 inner join tableLastNames t2 on t1.nameID = t2.nameID)
    END;to concatenate two string together do not use "+", but "||"
    SELECT FIRST_NAME||'.'||LAST_NAME FROM EMP;

  • FM : to call collective Search help and update two fields in SSCR

    Hi Experts,
         I have problem while using collective serach help.
        My scenario is using Collective Search help thru that i want to update 2 fields in my selection screen.
    Thru this function module F4IF_INT_TABLE_VALUE_REQUEST  i can mapping and update two fields using DYNP_VALUE_UPDATE but using this function module i can't able to call my Collective Search help
    in other way
    Thru F4IF_FIELD_VALUE_REQUEST  i can able to call the collective search help but _i can't mapping field and can't updated the
    selection screen field_
    Is any otherway to do it, Please help me ASAP.
    Regards,
    Florian.

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • Concatenate fields using commas

    How do I concatenate fields using proper English separators? I'm using Acrobat Pro X.
    I have fields named Field1, Field2, Field3, Field4 and Result.
    Example 1
    In Field1, I enter Apples. In Field2, Oranges. The other two fields are empty (Null).
    In the Result field it returns "Apples and Oranges."
    Example 2
    I add Grapes in Field3.
    The Result field returns, "Apples, Oranges, and Grapes."
    Example 3
    I add Pears to Field4,
    The Result should be,  "Apples, Oranges, Grapes, and Pears."
    Any help is appreciated.

    The script for this will be scaled up to ten total fields once complete and will only contain consecutively filled fields. This is what I have currently. It uses a separate field for the conjunction and obviously leaves the remaining commas and the end of the returned result.
    var a=getField(“Field1”).valueAsString
    var b=getField(“Field2”).valueAsString 
    var c=getField(“Field3”).valueAsString 
    var d=getField(“Field4”).valueAsString 
    var e=getField(“Field5”).valueAsString 
    var f=getField(“Field6”).valueAsString 
    var g=getField(“Field7”).valueAsString 
    var h=getField(“Field8”).valueAsString 
    var i=getField(“Field9”).valueAsString 
    var j=getField(“Field10”).valueAsString 
    var sep=getField(“separator”).valueAsString; 
    if(sep.length>=1) 
    {event.value=a+sep+ b+sep+ c+sep+ d+sep+ e+sep+ f+sep+ g+sep+ h+sep+ i+sep+ j+sep}
    Else event.value +””;

  • How to use two "field separator" in the same Comunication Channel

    Hi experts,
    I  upload flat files with XI, and my Comunication Channel is configured to use the field separator "~".
    FILA.fieldSeparator     ~
    Is posible to configure that Comunication Channel to accept two field separator. I want that upload flat files that has as separator "~" and flat files that has "|" .
    thanks
    regards

    IT IS not possible to have 2 fieldseparator to identify the fields of a record.

  • Join two table using two link field

    hi all
    i need to left join two table, and to link two table need to match two field
    ex: the link field is store_name and id
    i use below sql statement
    SELECT A1.store_name, A1.id, A1.card, A2.sale, A2.history
    FROM Georgraphy A1, Store_Information A2
    WHERE A1.store_name = A2.store_name(+)
    AND A1.id = A2.id(+)
    but it's wrong
    please tell me how to left join A1 and A2, thx!

    Whats your aim?
    Any error message?
    SQL> select * from geography;
            ID STORE_NAME
             1 a
             1 b
             2 a
             2 b
    SQL> select * from store_information;
            ID STORE_NAME
             1 a
             3 d
    SQL> SELECT *
      2  FROM Geography A1, Store_Information A2
      3  WHERE A1.store_name = A2.store_name(+)
      4  AND A1.id = A2.id(+);
            ID STORE_NAME         ID STORE_NAME
             1 a                   1 a
             2 a
             2 b
             1 b                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to use same Data Type and Length for two fields

    How to use same data type and length for two fields when using 'FOR ALL ENTRIES IN' in a select statement? For instance the select queries are :
    SELECT bukrs gjahr belnr lifnr budat bldat zlspr dmbtr waers shkzg
    FROM bsik
    INTO TABLE it_bsik
    WHERE bukrs = p_bukrs
    AND lifnr IN s_lifnr.
    IF it_bsik IS NOT INITIAL.
    SELECT belnr gjahr awkey awtyp
    FROM bkpf
    INTO TABLE it_bkpf
    FOR ALL ENTRIES IN it_bsik
    WHERE belnr = it_bsik-belnr
    AND gjahr = it_bsik-gjahr.
    IF it_bkpf IS NOT INITIAL.
    SELECT belnr gjahr lifnr xblnr
    FROM rbkp
    INTO TABLE it_rbkp
    FOR ALL ENTRIES IN it_bkpf
    WHERE belnr = it_bkpf-awkey+0(10)
    AND gjahr = it_bkpf-awkey+10(4).
    ENDIF.
    ENDIF.
    Here it gives an error in the 3rd select query that 'When you use the addition "FOR ALL ENTRIES IN itab", the fields "GJAHR" and "IT_BKPF2-AWKEY+10(4)" must have the same type and the same length.'
    Kindly clarify.

    Hi Saurabh,
    Please see the example code that I have developed for you. It will help you solve the problem.
    REPORT ZTEST_3 .
    tables : BKPF.
    data : begin of it_bkpf occurs 1,
             belnr type RE_BELNR,
             awkey type awkey,
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf.
    data : begin of it_bkpf1 occurs 1,
             belnr type RE_BELNR,
             awkey type gjahr,              " change the data type
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf1.
    data : begin of it_rbkp occurs 1,
             belnr type BELNR_D,
             gjahr type gjahr,
             lifnr type LIFRE,
             xblnr type XBLNR,
           end of it_rbkp.
    select belnr
           awkey
           awtyp
           gjahr
           from bkpf
           into table it_bkpf
           where BUKRS = 'TELH'.
    loop at it_bkpf.
    it_bkpf1-belnr = it_bkpf-belnr.
    it_bkpf1-awkey = it_bkpf-awkey+10(4).           "Here only append the required length.
    it_bkpf1-awtyp = it_bkpf-awtyp.
    it_bkpf1-gjahr = it_bkpf-gjahr.
    append it_bkpf1.
    clear it_bkpf1.
    endloop.
    select  belnr
            gjahr
            lifnr
            xblnr
            from RBKP
            into table it_rbkp
            for all entries in it_bkpf1
            where belnr = it_bkpf1-belnr
    This is just an example. Change the fields according to your requirement.
    Regards
    Abhii
    Edited by: Abhii on Mar 9, 2011 9:08 AM

  • Generic delta   using function module with two fields  AEDAT AND ERDAT

    Hi,
        i have scenario that i have to create a generic data source  having delta using funcation module and the delta speci fields are AEDAT AND ERDAT . Is there possibility with out using these two fields ( i mean AEDAT AND ERDAT)  in the extract structure can i create the data source . and provide sample code for me . it is very urgent.
    waiting for the reply,
    sri.c

    Hi Sri,
    here some coding, I hope this helps!
    first, get the delta-field
          LOOP AT s_s_if-t_select INTO l_s_select.
            CASE l_s_select-fieldnm.
              WHEN 'ZDATE'.
                MOVE-CORRESPONDING l_s_select TO r_date.
                IF r_date-high IS INITIAL OR r_date-high = space.
                  r_date-high = '9991231'.
                ENDIF.
                APPEND r_date.
            ENDCASE.
          ENDLOOP.
    Cursor öffnen
          OPEN CURSOR WITH HOLD s_cursor FOR
          SELECT * FROM
          WHERE  ....
          AND    erdat in r_date
          AND    aedat IN r_date.
          FETCH NEXT CURSOR s_cursor INTO CORRESPONDING FIELDS OF table e_t_data package size s_s_if-maxsize.
    regards
    Siggi
    PS: Note that this coding only works for a very straight forward extraction.
    Message was edited by: Siegfried Szameitat

  • Use DISTINCT with two fields to return one record

    I am using OleDB with a SELECT DISTINCT query that is used in C# code to populate a DataGridViewComboBox.  The queried table has two fields: ID and Description. The ID field values are unique. Descriptions may be duplicated. The DataSource of my DataGridViewComboBox
    is ListBoxItems which is a ListBox that is populated from a table. The ValueMember is ID and the DisplayMember is Description.  A sample table might look like this:
    ID    Description
     1     Blue
     2     Blue
     3     Red
     4     Blue
    I want my query to return two records; one for the Red description and only one for the Blue description.  I don't care which Blue description it returns, but I do need the corresponding ID for the selected Blue record and the ID value for the Red record. 
    Using SELECT DISTINCT ID, Description FROM... would give me four records instead of two.  How can I return only two records in this scenario?
    Rob E.

    Using window function:
    create table #temp
    ID int,
    description varchar(20),
    insert into #temp Values(1,'blue')
    insert into #temp Values(2,'blue')
    insert into #temp Values(3,'red')
    insert into #temp Values(4,'blue')
    ;WITH CTE AS (select RN=ROW_NUMBER() OVER (PARTITION BY description ORDER BY newid() ),
    ID,description from #temp)
    SELECT ID, description from CTE
    WHERE RN = 1;
    ID description
    4 blue
    3 red
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Inventory on Hand Report - Using Union ALL - need two fields to be part of the group

    Hi all,
    I have created an Inventory "on Hand" Report that takes the Current Inventory from the Item Entry table and the Sales from Unposted Sales Line table and Transfers in and out from the Unposted Transfer Line table.  I have joined the tables
    using the UNION ALL function. 
    My problem is that the Transfer table has two locations whereas the other tables only have one.  I am grouping on Location code from the Item Entry table which is equivalent to BOTH Transfer from location and the Transfer to.    
    As an example, there are 15lbs of inventory for Product A in Location #1 with a transfer out of 15 lbs.  The Transfer out is going to Location #2
    I don't know how to write the query or set up the group so that it recognizes both the Transfer to and the Transfer From fields
    I want the report to look similar to the one below but I can only get it to show one of the locations.  Is there some way to use the Union function and have one field in the first table be or equivalent to two fields in another?
    Location   Code
    Item No.
    Lbs
    Sales Orders
    Transfer Out
    Transfer In
    Available   Inventory
    Location #1
    Product A
    15
    -15
    Location #1
    15
    -15
    Location #2
    Product A
    15
    15
    Location #2
    15
    15

    Hi Igor,
    You can get a custom sort order added to your IP column without the need for a second column.
    Consider that the sorting is done strictly left-to-right across a string in the column. The string can be any valid HTML content. So, you could wrap your string within, say, a SPAN tag and add an attribute to that tag that contains the sort order you need before the text that is displayed to the user. As long as the attribute is correctly structured (that is, all instances are of the same length, for example), then sorting will work correctly. For example:
    SELECT
    '<span title="' || PAD_IP_ADDRESS(IP) || '">' || IP || '</span>' Y
    FROM ...Now you need to ensure that the PAD_IP_ADDRESS() function returns the correct values. In IP addresses, you have anything from "0.0.0.0" to "255.255.255.255". To get them to sort "numerically", you need to pad one or two digit numbers to get three digit numbers for each value - so, "0.0.0.0" becomes "000.000.000.000". You could create a function to do this - something like:
    CREATE OR REPLACE FUNCTION PAD_IP_ADDRESS
      pIP IN VARCHAR2
    RETURN VARCHAR2
    IS
      vIP VARCHAR2(15);
      vTEMP APEX_APPLICATION_GLOBAL.VC_ARR2;
      vSEP VARCHAR2(1);
    BEGIN
      vSEP := '';
      vIP := '';
      vTEMP := APEX_UTIL.STRING_TO_TABLE(pIP,'.');
      FOR x IN 1..vTEMP.COUNT
      LOOP
        vIP := vIP || vSEP || TRIM(TO_CHAR(TO_NUMBER(vTEMP(x)),'000'));
        vSEP := '.';
      END LOOP;
      RETURN vIP;
    END;The output from this would look something like:
    &lt;span title="001.001.001.001"&gt;1.1.1.1&lt;/span&gt;
    &lt;span title="002.255.255.255"&gt;2.255.255.255&lt;/span&gt;
    &lt;span title="010.001.199.098"&gt;10.1.199.098&lt;/span&gt;Andy

  • Suppressing the field using two conditions

    how to supress a field using Two conditions?

    In format field common tab
    Click formula icon next to suppress and enter your conditions eg
    field1 = x and field2 = y
    Ian

  • SQL Query CASE statement using two fields

    Hi,
    I have two fields. One is called rescategory1, the other is called rescategory2.
    I'm not sure if its a CASE statement I need or some sort of WHERE clause but I want to create a query that does the following or something similar:
    CASE rescategory2
    WHEN rescategory1 = '44' AND rescategory2 = '1' THEN 'Backup'
    WHEN rescategory1 = '44' AND rescategory2 = '2' THEN 'Hardware'
    END AS [Resolution Sub Category]
    Basically, I'm looking to give rescategory2 a value based on that of rescategory1 and rescategory2 combined.
    How do I write this?
    Cheers
    Paul

    do you mean this?
    rescategory2 = CASE
    WHEN rescategory1 = '44' AND rescategory2 = '1' THEN 'Backup'
    WHEN rescategory1 = '44' AND rescategory2 = '2' THEN 'Hardware'
    END
    ie assigning value for rescategory2
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • OBIEE 11g - without going to Sawbridge first.....

    If you called OBIEE via the default path: http://domain-name/analytics?NQuser=xxx&NQpassword=xxxx instead of http://domain-name/analytics/saw.dll?NQzuser=xxx&NQpassword=xxxx   would your credentials be checked by weblogic before the default login jsp

  • Cannot export to MPG2 from FCP 5.0.3

    Hey, Finally getting ready to burn my project to DVD using DVDSP. When I go to export to MPG2 however, it isn't listed as an option in my available codecs. There is: MPEG IMX 8-bit PAL - 50 Mvb/s - 48 kHz or MPEG 4 Then under custom, there is another

  • I have forgotten my password to get on to wi-fi

    I just had to replace my Verizon router and I cannot get back on to the network on my iPad1. Under settings, my usual wi-fi network address is not there. There is a new network address that shows up, but it does not recognize my password. How can I g

  • Error Msg while copying Adobe Form

    Hi, I am trying to copy an adobe form but I receive the following error message " Internal Error Occured in SAFP API".  Any help would be appreciated. Thanks,

  • Export Complete iMovie '08 project

    We are hoping to move an entire iMovie '08 project to a friends computer. We first tried just moving the project from the iMovie Projects folder to the same location on their Mac, but the .avi files that were imported into iMovie from iPhoto did copy