Concatenate two columns

Hi,
In BI 11g, I am trying to concatenate DAY/DATE Columns.
1."TM_Details"."Day" || "TM_Details"."Date"
2.concat("TM_Details"."Day")+concat("TM_Details"."Date")
But it displays some error, like
Formula syntax is invalid.
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22020] Function Concat does not support non-text types. (HY000)
SQL Issued: SELECT "TM_Details"."Day" || "TM_Details"."Date" FROM "TMD"
Thanks
Kavitha

Hi kavitha,
1."TM_Details"."Day" || cast("TM_Details"."Date" as char)This works out perfectly as the syntax is right.But you need to cast it accordingly.
2.concat("TM_Details"."Day")+concat("TM_Details"."Date")concat(cast("TM_Details"."Day as char),"cast(TM_Details"."Date" as char)) this is the right syntax.
Before check what is the datatype of day column and Date column as it is erroring out as mismatch.Accordingly convert
Use cast function to convert it to the format needed and here is the cast syntax cast(column as datatype)
*UPDATED POST*
Invalid Alias Format : Table_name.Column_name requiredDont type the table name and column name manually.Please select it from the subject area into the criteria and check if this table name and column name are correct and coming from the same table.
hope answered.award points.
Cheers,
KK
Edited by: Kranthi.K on May 24, 2011 11:50 PM

Similar Messages

  • Concatenate two columns in Obiee 11g

    Hi,
    I am trying to concatenate two columns from same table in OBIEE 11G , i tried all below syntax
    cast("Period"."Year" as Varchar)|| cast ("Period"." Month Name" as Varchar)
    cast("Period"."Year" as char)|| cast ("Period"." Month Name" as char)
    contact(cast("Period"."Year" as char), cast ("Period"." Month Namer" as char))
    I am getting this error as - Invalid Alias Format : Table_name.Column_name require . Plz Help me Guys
    Thanks
    Edited by: Neha on Apr 16, 2012 3:41 PM

    Column forumal example based on vanilla usage tracking RPD:
    cast("Query Time"."Year" as varchar(4)) || "Query Time"."Month"BTW: "Month Name" implies a string already so I doubt you'll need to cast it as one...
    C.

  • Concatenate two Columns in OAF

    Dear Friends ,
    I have a OAF Page developed with advanced table , i would like to concatenate first two
    columns . is there any way that i can achieve this ?
    Note : I am using a sear without entity Object ( VO based Search )
    Please share your thoughts .
    Thanks in Advance ,
    Keerthi.k

    There are multiple ways to do it.
    Fully Declarative Way
    1. Add transient variable to your VO.
    Expand Attributes in VO Editor, select the newly created attribute, Check 'selected in query' checkbox.
    in Query Column, give some alias, enter expression as <column1> || <column2>
    Fully Programmatic Way
    1. Add transient variable to your VO.
    2. Capture the event in CO...pass the control to AM...from AM pass the control to VOImpl.
    3. Loop thru VO using an iterator.
    4. create a method in VORowImp to concatenate the two column and populate into the attribute created in step 1 (Use populateAttribute(.., ..) so that the VORow is not dirtied)
    5. for every row, call the method created in step 4.
    Hrishikesh

  • HTML-DB 1.6 SQL Query (Concatenate two columns)

    Hi everyone,
    My query look like this. But I got this message
    ORA-01403: no data found
    Sql query(.....returning ... sql
    What I can do ? I want to concatenate my two columns in one.
    <pre>
    -----Résultats de la recherche
    BEGIN
    DECLARE
    requete varchar2(5000);
    v_code_type varchar2(2000);
    v_ordre varchar2(500);
    BEGIN
    :P1_NOM_BENEFICIAIRE := REPLACE(:P1_NOM_BENEFICIAIRE,' ', '%');
    :P1_NOM_BENEFICIAIRE := REPLACE(:P1_NOM_BENEFICIAIRE,'-', '%');
    requete := 'SELECT
    (FEUI.NOM_BENEFICIAIRE || ''--'' || FEUI.PRENOM_BENEFICIAIRE) ABC,
    FEUI.VALEUR_ID_BENEFICIAIRE,
    FEUI.MONTANT,
    FEUI.CODE_TYPE_DECLARATION,
    FEUI.ANNEE_FISCALE,
    FEUI.CODE_ENTITE,
    FEUI.ID_FEUILLET_IMPOT,
    FEUI.ID_AMENDEMENT,
    FEUI.NO_RELEVE_ORIGINAL_PROV,
    FEUI.ACRONYME_ID_BENEFICIAIRE,
    TYPD.SIGNIFICATION
    FROM
    S29_FEUILLET_IMPOT FEUI,
    S29_TYPE_DECLARATION TYPD
    WHERE
    (TYPD.CODE = FEUI.CODE_TYPE_DECLARATION) AND
    (ANNEE_FISCALE = :P1_ANNEE_FISCALE) AND
    (CODE_ENTITE LIKE ''%'' || SUBSTR(:P1_CODE_ENTITE,1,3) || ''%'') OR
    (CODE_ENTITE = SUBSTR(:P1_CODE_ENTITE,1,3))
    AND
    ((:P1_NAS IS NULL) OR (:P1_NAS = VALEUR_ID_BENEFICIAIRE))
    AND
    ((:P1_NEQ IS NULL) OR (:P1_NEQ = VALEUR_ID_BENEFICIAIRE))
    AND
    ((:P1_NOM_BENEFICIAIRE IS NULL) OR
    ((UPPER(NOM_BENEFICIAIRE) || UPPER(PRENOM_BENEFICIAIRE))
    LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
    ((UPPER(PRENOM_BENEFICIAIRE) || UPPER(NOM_BENEFICIAIRE))
    LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
    ((UPPER(RAISON_SOCIALE_LIGNE_1) || UPPER(RAISON_SOCIALE_LIGNE_2))
    LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
    ((UPPER(RAISON_SOCIALE_LIGNE_2) || UPPER(RAISON_SOCIALE_LIGNE_1))
    LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'') OR
    (UPPER(SUBSTR(COORDONNEE_BENEFICIAIRE_SYGBEC,1,80))
    LIKE ''%'' || UPPER(:P1_NOM_BENEFICIAIRE) || ''%'')
    IF (:P1_CODE_RELEVE = 'A') OR
    (:P1_CODE_RELEVE = 'M') OR
    (:P1_CODE_RELEVE = 'C') THEN
    v_code_type := '(
    (FEUI.CODE_TYPE_DECLARATION = ''A'') OR
    (FEUI.CODE_TYPE_DECLARATION = ''M'') OR
    (FEUI.CODE_TYPE_DECLARATION = ''C'')
    else
    v_code_type :=
    (:P1_CODE_RELEVE = CODE_TYPE_DECLARATION) OR
    (:P1_CODE_RELEVE = ''%'')
    end if;
    WWV_FLOW.DEBUG('V_CODE_TYPE EST EGALE A :' || v_code_type);
    v_ordre := 'ORDER BY NOM_BENEFICIAIRE, VALEUR_ID_BENEFICIAIRE,
    ID_FEUILLET_IMPOT, ID_AMENDEMENT';
    requete := requete || ' AND ' || v_code_type || v_ordre;
    RETURN requete;
    END;
    END;
    </pre>
    Thanks. Bye

    Thank you Scott,
    I'm sorry, I should present you a reduce sql command.
    I had construct my "long" sql command without concatenation. But, I decide to add a column just beside the other column.
    After sending my message on OTN, I tried something else, I decided to copy my sql command without concatenation in an other region. I changed my sql command in the new region by adding my new column and this ''--'' and it works very well. Sometimes, It's really difficult to understand why it doesn't.
    Thanks. Bye,

  • How to concatenate two column in ALV

    dear,
    How to concatenate two ALV columns
    yatendra sharma

    dear
    I have to concatenate 3 fields
    PERFORM fill_fields_of_fieldcatalog
        USING 'IT_FINAL' 'NAME2' ' ' ' ' 'Customer Address' .
      PERFORM fill_fields_of_fieldcatalog
        USING 'IT_FINAL' 'STRAS' ' ' ' ' 'Street' .
      PERFORM fill_fields_of_fieldcatalog
        USING 'IT_FINAL' 'ORT01' ' ' ' ' 'City'.
    how can we join them
    Yatendra

  • Concatenating two columns in obiee 11g

    Hi,
    I am getting an syntax error when i concatenate two columns from the same table and i think syntax is correct.
    below is the column formula:
    (cast("Dim Stock Market"."Days High" as varchar))||'/'||(cast("Dim Stock Market"."Days Low" as varchar))
    error:
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27002] Near <)>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT (cast("Dim Stock Market"."Days High" as varchar))||'/'||(cast("Dim Stock Market"."Days Low" as varchar)) FROM "Stock Model"

    got the answer.
    Edited by: Rohit_L on Jan 29, 2013 4:00 AM

  • 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.

  • How to concatenate two colums into one single column

    I need some ideas to concatenate two different columns into one single column using a set of distinct values.
    For Example,
    Customer Product Number
    xyz A 1
    xyz B 2
    xyz B 1
    AAA C 7
    AAA A 1
    The result should look like this,
    Customer Value
    xyz A1 B2 B1
    AAA C7 A1
    How would I group this into once value ?
    Thanks in advance ...

    Tom's discussion of writing your own aggregate routines
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2196162600402
    starts off with a link to the 8i alternatives
    "see
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:229614022562
    for 8i methods (not aggregates)"
    Unforutnately, it's a lot more work in 8i.
    Justin

  • How do I count the unique value pairs in two columns of a table?

    I have a table (Table 2) that is populated with data from an imported .csv file. On table 1 I need to count the unique value pairs in two columns of Table 2.
    Here's what I have:
    Date                                        Person
    7/10/2011                         A
    7/12/2011                         W
    7/12/2011                         X
    7/12/2011                         X
    7/12/2011                         X
    7/12/2011                         Z
    7/14/2011                         Z
    7/15/2011                 X
    7/16/2011                         Z
    I'm focusing on person "X" and can easily count how many days that person shows up but what I want is to see on how many unique days that person shows up.
    Here's the result I'm looking for (Person "X" shows up on 2 different days - 3 times on 7/12/2011 and once on 7/15/2011):
    X                    2
    I can't seem to find a function that allows me to do that. I also am not allowed to modify Table 2 so that leaves me to come up with a solution on Table 1.
    Any ideas would be greatly appreciated.

    Hi John,
    Not being allowed to modify Table 2 is a minor inconvenience. Just copy (using a formula) the necessary two columns onto Table 1.
    Yellow columns may be hidden. The procedure progresses from left to right. All formulas are entered into row 2 then filled down that column to the end of the table. The table must be as long as the list in column A of Table 2.
    A2: =Table 2::A
    Fill right to column B.
    Fill both columns down as far as needed.
    I've used actual Date and Time values in column A, formatted to show only the Date part, but the technique will work with text in these cells, provided all cells representing the same 'date' have exactly the same content.
    C2: =A&B
    This concatenates the contents of each row of columns A and B into a single text string.
    D2: =COUNTIF($C$2:C2,C)
    This counts the number of occurrences of the Date&Name string on the current row from the first regular cell in column C (C2) to the current cell.
    E2: =IF(COUNTIF($B$2:B2,B)=1,MAX($E$1:E1)+1,"")
    This constructs the index of first occurrences of each name, in the order they first occur. The index is used by LOOKUP in column F.
    F2: =IF(ROW()-1>MAX(E),"",LOOKUP(ROW()-1,$E,$B))
    This uses the index value created in E as a search-for value to extract a single copy of the names in column B. The result is a list of all distinct names in the list. Note that spelling differences will be counted as distinct names.The IF statement stops the listing when the last distinct name is extracted.
    G2: =IF(LEN(F)>0,COUNTIFS($B,"="&F,$D,"=1"),"")
    This counts the number of 'first occurrences of distinct Date & Name strings for each name on the list (ie. the number of distinct dates on which each name appears in the original list).
    All of the functions used are described, with at least one example for each, in the iWork formulas and Functions User Guide. You can download the guide, and the Numbers '09 User Guide, via the Help menu in numbers.
    Regards,
    Barry

  • How to concatinate values of two columns and update into another column

    There is a table : TEST contains three columns - Column1 , Column2 , Column 3
    Column1 contains values - (1,2,4)
    Column2 contains values : (a,b,c)
    Column 3 is empty .
    Target : Values in column 3 should be (1a,2b,4c)
    Need to achieve this through procedure .

    Paul if i want to concatenate two strings or alpha numeric characters from 2 fields and display in the third field,Will this code be able to do that?

  • Concatenate Report columns

    Is there a way to concatenate two report columns into 1. For example, I have a employee and employee number. Instead of displaying it in two columns I wanted it to look like this in one column:
    Employee - Employee Number
    Any help would be great. Thanks

    You would run this from where you originally had two columns and now want one...
    You can create a region defined as an SQL report and run it there as well..

  • Clean up output when using concat for two columns?

    Probably a basic questions, but I searched this forum and google and couldn't find an answer, so here it goes...
    I'm trying to concatenate two fields: first_name and last_name
    I'm using the following pl/sql:
    concat(a.first_name, a.last_name)But it runs the name together
    smithjohn And the title shows the following
    concat(a.first_name,a.last_name)And this output is going to a non-technical users, so I don't want them to freak out...
    I've tried this as well
    a.first_name||' '||a.last_nameAnd now the column, I get the following:
    Smith John But the column heading shows
    a.first_name||""||a.last_nameIs there anyway I can clean up the column heading so the end users won't be confused...?
    thanks
    Message was edited by:
    cmmiller

    For renaming the title of the column use an alias with "AS" or just put the alias after the concatenation.
    Examples:
    denunez@XE> select e.first_name||' '||e.last_name as Name from employees e  where rownum <3
      2  ;
    NAME
    Ellen Abel
    Sundar Ande
    denunez@XE> select e.first_name||' '||e.last_name Name from employees e  where rownum <3
      2  ;
    NAME
    Ellen Abel
    Sundar Ande
    denunez@XE> select e.first_name||' '||e.last_name "Employee Name" from employees e where rownum<3;
    Employee Name
    Ellen Abel
    Sundar Ande

  • Combine two columns data in single field STRAS

    Hi experts,
    I have to upload vendor master using direct method LSMW,
    I have been given an excel file having number of fields along with data and  House number and Street the data is in two different columns, but in master table there is only one field called STRAS which is combined for House number and street.
    How do i combine data of this two columns in single field STRAS
    Regards,
    Vijaya B.

    field-symbols: <fs> type line of itab_excel.
    loop at itab_excel assigning <fs>.
       concatenate <fs>-house <fs>-street into <fs>-newfield.
    endloop.
    by the end of the loop new filed will hold value needed for STRAS

  • ComboBox with two columns?

    Do you guys know how we can have a DAC comboBox with two columns(e.g. emp_no, emp_name) to update a column(e.g. emp_no) in database?
    Thanks for your response.
    Ali
    null

    grin You don't like my suggestion of creating a view ( or view object ) that where you concatenate 2 or more strings of interest into a separate new attribute... that is used to display?
    Yeah, kinda hokey, but quick to implement.

  • Merging two columns with muliple rows in Numbers '09

    I am trying to merge two columns each with 100 rows and related data. Column one is the street address and column two have office numbers. The final result would be one column with 100 rows with address and office numbers.
    Ed Carreon

    sanpanza wrote:
    I am trying to merge two columns each with 100 rows and related data. Column one is the street address and column two have office numbers. The final result would be one column with 100 rows with address and office numbers.
    Ed Carreon
    Hi Ed,
    Use the CONCATENATE() function.
    Street address in column D, Office number in Column E
    100 Smith ST            212
    Formula: =CONCATENATE(E," ",D)
    Result:
    212 100 Smith ST
    Note the formula has three arguments, the reference to column E, a text literal (" ") containing a single space, and a reference to column D.
    Regards,
    Barry

Maybe you are looking for

  • CAF WebServices don't appear in CAF Admin's External Service Configuration

    Hi, I have developed Web Services in CAF and deployed them on the WAS but they don't appear on the CAF Administrative Tools -> External Service Configuration under Service Registry.  They appear in the Web Service Navigator running on the J2EE-Engine

  • Looking for a proper analytical query/solution for below data

    I have data as shown below: mob_id     status_code     status_text     media_date 39585     600     Online     04-Aug-09 54988     600     Online     05-Aug-09 39585     600     Online     05-Aug-09 39585     600     Online     06-Aug-09 39585     60

  • System Copy Error @ CreateDB using control.sql file

    Hi Experts, I am doing A Homogeneous System Copy. I have installed DB and patched 10.2.0.2 as source is of the same level. After DB Installation, restored DB , run the control.sql file and opened it. Recovered DB using this way: "Recover Database usi

  • Using Tabs in Generated Pages - Validation Issue

    Hi, We're using JHS 10.1.3.0.97 and are using the "stacked" regions functionality to make the form less cluttered. The problem we're having now is that whenever a user wants to view the items on a tab (that is not currently the selected one), a valid

  • SAP-IX Stop the CommunicationChannel in RWB

    Hi, Could you pls let me know how to stop the Channel in RuntimeWorkBench in XI 3.0. Thanks, Ram