Split char. Column to 2 columns in BEx

Hi Friends, is this possible in BEx?
I have data in DSO like this
Acc. Doc   G/L Account    Amount
101            41000001         $10
101            41000001         $20
101            71000001         $30
101            71000001         $40
In my BEx report. I want to split G/LAccount Column to 2 columns depending on account #
If G/L Account # is betn 41000000 - 41999999  ==> Rev. G/L account
If G/L Account # is betn 71000000 - 71999999  ==> Cost . G/L account
report output should look like below.
Acc Doc   Revenue G/L Account        Cost G/L account       Rev. Amount     Cost Amount
101                  41000001                           71000001                 $30                     $70
building a new DSO is not an option.
thanks
Sam
Edited by: Samuel Palaparthi on Nov 2, 2009 5:41 PM

Hi ,
How did you solve his, we have similar issue, can you help..
any one can help

Similar Messages

  • Split a column based on even and odd rows

    Table1
          Table2
     Col1
    Odd
    Even
      A
     A
      B
      B
     C
      D
      C
     E
      F
      D
     G
      H
      E
     I
    NULL
      F
      G
      H
      I
    I am using MS SQL v2005
    I want to split a column into two columns : -
    one column must have all the odd rows data while the other column must have even rows data
    in other words I want the data in Table1 to be displayed as data in Table2. 
    Col, Odd and Even are column names

    In SQL 2005 wont approach like what I suggested do only a single scan of the table?
    A major problem with your solution is that you assume that 1) the values are contiguous 2) they are numeric. Try the below:
    CREATE TABLE #t (id INT NOT NULL IDENTITY(1,1), Col1 CHAR(1))
    INSERT INTO #t VALUES ('A'),('B'), ('C'),('D'), ('E'),('F'), ('G'), ('H'), ('I')
    go
    SELECT MAX(CASE WHEN Col1 % 2 > 0 THEN Col1 END),
    MAX(CASE WHEN Col1 % 2 = 0 THEN Col1 END)
    FROM
    SELECT Col1,ROW_NUMBER() OVER (PARTITION BY (Col1 % 2) ORDER BY Col1) AS Rn
    FROM #t
    )t
    GROUP BY Rn
    go
    ; WITH numbering AS (
        SELECT Col1, row_number() OVER (ORDER BY Col1) AS rowno
        FROM   #t
    ), leading AS (
       SELECT Col1 AS odd, LEAD(Col1) OVER(ORDER BY rowno) AS even, rowno
       FROM   numbering
    SELECT odd, even
    FROM   leading
    WHERE  rowno % 2 = 1
    go
    DROP TABLE #t
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Inserting blanks into a NOT NULL CHAR column

    How do you insert a value of blank/spaces into a NOT NULL CHAR column. Oracle 9i interprets the space as a NULL and the insert fails because the column does not allow NULLS. Thanks in advance.

    Hi,
    19:07:13 topgun>create table t1(c1 varchar2(10) not null);
    Table created.
    19:07:33 topgun>insert into t1 values (' ');
    1 row created.
    19:07:42 topgun>select * from t1;
    C1
    19:07:46 topgun>select count(*) from t1;
      COUNT(*)
             1
    19:07:53 topgun>select * from V$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production- Pavan Kumar N

  • Display Parent node in a separate column in BEx

    Hi all,
    I have a requirement to display parent node of a node in a separate column in BEx.
    For e.g. If 'a' and 'b' belong to the parent node 'c,' I need to display 'c' in a separate column whenever 'a' or 'b' occur in the report.
    Any ideas how I can accomplish this? I already have a hierarchy enabled in the report. The client
    still wants to display the parent node in a separate column
    Thanks and points will be assigned.

    Hi Claus,
    You can use the following as table cell editor:
    1. Image -- just displays plain image
    2. Caption -- dislays image along with text or image only (or text only).
    3. LinkToAction -- same as caption, however provides you a way to have something like "onClick" action.
    Regards,
    VS

  • Concatenate out put of 2 or more columns in BEX Report in to one column

    Hi,
    I am working on service order report in BEX, and i would like to Concatenate out put of 2 or more columns in BEX Report in to one column.
    Please share me if any scenarios.
    Thank
    Neni

    Hi Ashutosh,
    Thanks for your reply,
    Actually in my report 4 different columns belongs to service orders information from different departments, i want see all 4 columns information in to single column, those four are virtual characteristics.
    As per your solution concatenate in workbook using function, can you please give me the steps how to do that.
    Thanks for your help.
    Thanks
    Neni.

  • ORA-01401 error on char column with oracle oci driver

    Hello,
    We found a potential bug in the kodo.jdbc.sql.OracleDictionary class
    shipped as source with Kodo:
    In newer Kodo versions (at least in 3.3.4), the method
    public void setString (PreparedStatement stmnt, int idx, String
    val,          Column col)
    has the following code block:
    // call setFixedCHAR for fixed width character columns to get padding
    // semantics
    if (col != null && col.getType () == Types.CHAR
    && val != null && val.length () != col.getSize ())
    ((OraclePreparedStatement) inner).setFixedCHAR (idx, val);
    This block seems to be intended for select statements but is called on
    inserts/updates also. The latter causes a known problem with the Oracle
    oci driver when settings CHAR columns as FixedCHAR, which reports an
    ORA-01401 error (inserted value too large for column) when definitely no
    column is too long. This does not happen with the thin driver.
    We reproduced this with 8.1.7 and 9.2.0 drivers.
    For us we solved the problem by subclassing OracleDictionary and removing
    the new code block.
    Regards,
    Rainer Meyer
    ELAXY Financial Software & Solutions GmbH & Co. KG

    Rainer-
    I read at
    re:'ORA-01401 inserted value too large for column' - 9i that:
    "This is fixed in Oracle9i Release 2"
    Can you try that version of the driver? Also, does it fail in the Oracle
    10 OCI driver?
    Rainer Meyer wrote:
    Hello,
    We found a potential bug in the kodo.jdbc.sql.OracleDictionary class
    shipped as source with Kodo:
    In newer Kodo versions (at least in 3.3.4), the method
    public void setString (PreparedStatement stmnt, int idx, String
    val,          Column col)
    has the following code block:
    // call setFixedCHAR for fixed width character columns to get padding
    // semantics
    if (col != null && col.getType () == Types.CHAR
    && val != null && val.length () != col.getSize ())
    ((OraclePreparedStatement) inner).setFixedCHAR (idx, val);
    This block seems to be intended for select statements but is called on
    inserts/updates also. The latter causes a known problem with the Oracle
    oci driver when settings CHAR columns as FixedCHAR, which reports an
    ORA-01401 error (inserted value too large for column) when definitely no
    column is too long. This does not happen with the thin driver.
    We reproduced this with 8.1.7 and 9.2.0 drivers.
    For us we solved the problem by subclassing OracleDictionary and removing
    the new code block.
    Regards,
    Rainer Meyer
    ELAXY Financial Software & Solutions GmbH & Co. KG
    Marc Prud'hommeaux
    SolarMetric Inc.

  • Querying CHAR columns with character length semantics unreliable

    Hi again,
    It appears that there is a bug in the JDBC drivers whereby it is highly unlikely that the values of CHAR columns that use character length semantics can be accurately queried using ResultSet.getString(). Instead, the drivers return the value padded with space (0x#20) characters out to a number of bytes equal to the number of characters multiplied by 4. The number of bytes varies depending on the number and size of any non-ascii characters stored in the column.
    For instance, if I have a CHAR(1) column, a value of 'a' will return 'a ' (4 characters/bytes are returned), a value of '\u00E0' will return '\u00E0 ' (3 characters / 4 bytes), and a value of '\uE000' will return '\uE000 ' (2 characters / 4 bytes).
    I'm currently using version 9.2.0.3 of the standalone drivers (ojdbc.jar) with JDK 1.4.1_04 on Redhat Linux 9, connecting to Oracle 9.2.0.2.0 running on Solaris.
    The following sample code can be used to demonstrate the problem (where the DDL at the top of the file must be executed first):
    import java.sql.*;
    import java.util.*;
    This sample generates another bug in the Oracle JDBC drivers where it is not
    possible to query the values of CHAR columns that use character length semantics
    and are NOT full of non-ascii characters. The inclusion of the VARCHAR2 column
    is just a control.
    CREATE TABLE TMP2
    TMP_ID NUMBER(10) NOT NULL PRIMARY KEY,
    TMP_CHAR CHAR(10 CHAR),
    TMP_VCHAR VARCHAR2(10 CHAR)
    public class ClsCharSelection
    private static String createString(char character, int length)
    char characters[] = new char[length];
    Arrays.fill(characters, character);
    return new String(characters);
    } // private static String createString(char, int)
    private static void insertRow(PreparedStatement ps,
    int key, char character)
    throws SQLException
    ps.setInt(1, key);
    ps.setString(2, createString(character, 10));
    ps.setString(3, createString(character, 10));
    ps.executeUpdate();
    } // private static String insertRow(PreparedStatement, int, char)
    private static void analyseResults(PreparedStatement ps, int key)
    throws SQLException
    ps.setInt(1, key);
    ResultSet results = ps.executeQuery();
    results.next();
    String tmpChar = results.getString(1);
    String tmpVChar = results.getString(2);
    System.out.println(key + ", " + tmpChar.length() + ", '" + tmpChar + "'");
    System.out.println(key + ", " + tmpVChar.length() + ", '" + tmpVChar + "'");
    results.close();
    } // private static void analyseResults(PreparedStatement, int)
    public static void main(String argv[])
    throws Exception
    Driver driver = (Driver)Class.forName(
    "oracle.jdbc.driver.OracleDriver").newInstance();
    DriverManager.registerDriver(driver);
    Connection connection = DriverManager.getConnection(
    argv[0], argv[1], argv[2]);
    PreparedStatement ps = null;
    try
    ps = connection.prepareStatement(
    "DELETE FROM tmp2");
    ps.executeUpdate();
    ps.close();
    ps = connection.prepareStatement(
    "INSERT INTO tmp2 ( tmp_id, tmp_char, tmp_vchar " +
    ") VALUES ( ?, ?, ? )");
    insertRow(ps, 1, 'a');
    insertRow(ps, 2, '\u00E0');
    insertRow(ps, 3, '\uE000');
    ps.close();
    ps = connection.prepareStatement(
    "SELECT tmp_char, tmp_vchar FROM tmp2 WHERE tmp_id = ?");
    analyseResults(ps, 1);
    analyseResults(ps, 2);
    analyseResults(ps, 3);
    ps.close();
    connection.commit();
    catch (SQLException e)
    e.printStackTrace();
    connection.close();
    } // public static void main(String[])
    } // public class ClsColumnInsertion

    FYI, this has been mentioned as early as November last year:
    String with length 1 became 4 when nls_lang_semantics=CHAR
    and was also brought up in Feburary:
    JDBC thin driver pads CHAR col to byte size when NLS_LENGTH_SEMANTICS=CHAR

  • TopLink JPA - trailing spaces on Char column

    Gurus,
    In JDBC you use the following to ignore trailing spaces when querying on Char column:
    OracleConnection conn = (OracleConnection) c;
    conn.setDefaultFixedString(true);
    How to achieve this using TopLink JPA?
    Thanks much,
    Nicky

    Nicky,
    I believe you would need to do this in API. Ideally setting these configurations on the properties of the JDBC connection pool is easier but if you wish to do it with TopLink Essentials I would use a session event listener's postAcquireConnection to customize it.
    In the persistence.xml you will need to configure your persistence unit to use a session customer like:
            <property name="toplink.session.customizer" value = "mypackage.JDBCConnectionConfig"/>Then you will need to implement this customizer and include it on the classpath of your application:
    public class JDBCConnectionConfig implements SessionCustomizer {
        public void customize(Session session) {
            session.getEventManager().addListener(new JDBCConfigEventListener());   
        class JDBCConfigEventListener extends SessionEventAdapter {
            public void postAcquireConnection(SessionEvent event) {
                Connection conn = ((DatabaseAccessor) event.getResult()).getConnection();
                OracleConnection oconn = (OracleConnection) conn;
                oconn.setDefaultFixedString(true);
    Note: I did not see setDefaultFixedString in the most recent version of the Oracle JDBC driver
    I would definitely look into configuring your data source's connection pool with this property enabled before adding this event listener.
    Doug

  • Webi report display splits a column

    Hi
    fairly new to Webi so I hope this doesn't sound too basic. I have a Webi report that is 30 odd columns wide (this is currently BOXI R2 on Windows 2003); it's displayed in Landscape mode and splits several columns down the middle. How can you define where the vertical page breaks should be and/or which columns should not be split?
    Cheers
    Mark Gillis

    Thanks for getting back. That's not quite the problem: it's a 'standard' Webi report (not a crosstab) and has over 40 columns. Even in landscape mode, that displays over 5 pages. The problem is vertical splits: I can fit columns 1 to 7 on page 1 and then column 8 is half on the first page and half on the second (this is displaying in Page mode in Infoview: I can display in Draft mode, of course, to get a full span display of the report).
    What I'm trying to do is define the report so that when a user displays in Page mode columns do not get split. It may be that Draft mode is the only answer but I was hoping a setting would exist to say "don't split columns over pages".

  • How to split a column in adobe livecycle design?

    How does one split a column in adobe livecycle design. I have found that one can split a column after you have merged it. But I want to split two columns into four in the middle of a table. This can be done in Word. Is there a way even if one has to split each row? Does any one know? Like in the table below I would like to make Header 2 & Header 3, Rows 2 and 3 into 2 rows 4 columns.
    Header 1
    Header 2
    Header 3
    Header 4
    Thanks
    Sheila

    If you want to have 1 column to be split in 4 columns, you can insert a table with 4 columns inside a column cell.. If you mean to add rows and you want to keep those 4 columns, you should add instances of the row where you inserted the table with 4 columns...
    Hope this helps!
    Mag

  • Split a Column to Three Columns

    Hello Y'all Gurus,
    I have a column and I need to split this column to three columns. The following are samples of data to be split:
    Sample #1: 
    From
    Column:  2.5 (3 - 47) or
                  2.5 (3-47) or
                  2.5(3 -47) or
                  2.5(3-41/47)
    To
    Column #1: 2.5
    Column #2: 3
    Column #3: 47
    Sample #2:
    From
    Column:  4X6(2-72)
    To
    Column #1: 4
    Column #2: 2
    Column #3: 72Any and all the help would be greatly appreciated.
    Thanks in advance.

    Hi,
    Try this. If there are any cases this may fail let me know. Not unit tested.
    SQL> WITH T
      2       AS (SELECT '2.5 (3 - 47)' TXT FROM DUAL
      3           UNION ALL
      4           SELECT '2.5 (3-47)'  FROM DUAL
      5           UNION ALL
      6           SELECT '2.5(3 -47)' FROM DUAL
      7           UNION ALL
      8           SELECT '2.5(3-41/47)' FROM DUAL
      9           UNION ALL
    10           SELECT '4X6(2-72)' FROM DUAL)
    11  SELECT REGEXP_SUBSTR (TXT, '^(\.[0-9]+|[0-9]+(\.[0-9]*)?)') COL1
    12        ,LTRIM (REGEXP_SUBSTR (TXT, '\((\.[0-9]+|[0-9]+(\.[0-9]*)?)'), '(') COL2
    13        ,RTRIM (REGEXP_SUBSTR (TXT, '(\.[0-9]+|[0-9]+(\.[0-9]*)?)\)'), ')') COL3
    14    FROM T;
    COL1         COL2         COL3
    2.5          3            47
    2.5          3            47
    2.5          3            47
    2.5          3            47
    4            2            72
    SQL> G.

  • PreparedStatement and CHAR columns

    Hi
    I am having troubles using preparedStatements on tables with columns of type CHAR:
    My table has a column of type CHAR(3). The data in this column is 0,1,2 or three characters long.
    My query contains this column in the WHERE clause in the from "WHERE colName = ?".
    The problem is now, that I have to use a String in the pstmt.setString(1, str) statement that is exactly 3 characters long. Otherwise I don't get any result.
    If I use a 2 char string i get nothing. But with a 'normal' statement or in SQL*Plus it works perfectly fine.
    Of course, I could trim() my column or fill the string up to be always 3 chars, but I think that's not state of the art.
    Any other solutions?
    Thanks in advance.
    Andres
    null

    What you describe is the ANSI behavior of a CHAR column. VARCHAR columns can match on any length (and can be any length up to the maximum or the column constrint limit), but a char column is required to be blank padded. If you must use CHAR then write a function to automatically pad the string for you so that it will match.

  • Split multiple columns into rows using XML

    Hi Forum,
    I am trying to split 2 columns that each contain values separated by semicolon into single rows. The relation between the values of the two columns is that the order in the cells corresponds to each other.
    The data looks like this:
    pk    Manufacturer                partnumber
    1     Man1; Man2;Man3      PN1;PN2;PN3
    2     Man4; Man2;Man5      PN4;PN5;PN6
    The result should be:
    pk    Manufacturer     partnumber
    1       Man1                   PN1
    1       Man2                   PN2
    1       Man3                   PN3
    2       Man4                   PN4
    2       Man2                   PN5
    2       Man5                   PN6
    I am not sure how to format the XML to get a useful Basis for XML.value or XML.query
    Any ideas?
    TIA
    Alex

    Hi,
    Try like this ,
    DECLARE @tmp TABLE (pk INT,Manufacturer NVARCHAR(50),partnumber NVARCHAR(50))
    INSERT @tmp SELECT 1,'Man1; Man2;Man3','PN1;PN2;PN3'
    INSERT @tmp SELECT 2,'Man4; Man2;Man5','PN4;PN5;PN6'
    SELECT * FROM @tmp
    SELECT tmp2.pk pk,Manufacturer,partnumber FROM (
    SELECT ROW_NUMBER()OVER(ORDER BY tmp1.pk) RN,* FROM (
    SELECT pk,
    LTRIM(i.value('.','varchar(100)')) Manufacturer
    FROM ( SELECT pk, Manufacturer,
    CONVERT(XML,'<r><n>'
    + REPLACE(Manufacturer,';', '</n><n>') + '</n></r>') AS X
    FROM @Tmp) Spt
    CROSS APPLY Spt.X.nodes('//*[text()]') x(i)
    ) tmp1 ) tmp2
    JOIN
    (SELECT ROW_NUMBER()OVER(ORDER BY pk) RN,* FROM (
    SELECT pk,
    j.value('.','varchar(100)') partnumber
    FROM ( SELECT pk, partnumber,
    CONVERT(XML,'<r><n>'
    + REPLACE(partnumber,';', '</n><n>') + '</n></r>') AS Y
    FROM @Tmp) Spt
    CROSS APPLY Spt.Y.nodes('//*[text()]') y(j)) tmp2 ) tmp3 ON tmp3.RN = tmp2.RN
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • Splitting one column into different columns.

    Hello Experts,
    How do i split datetime column into different columns while doing a Select statement.
    Ex:
    The column "REC_CRT_TS" has data like "2014-05-08 08:23:09.0000000".The datatype of this column is "DateTime". And i want it in SELECT statement like;
    SELECT
    YEAR(DATETIME) YEAR,
    MONTH(DATETIME) MONTH,
    DATENAME(DATETIME) MONTHNAME,
    DATEPART(DATETIME) WEEKNUM,
    DAY(DATETIME) DATE,
    DATEPART(DATETIME) HOUR
    FROM TABLE_NAME;
    The output should look like this;
    --YEAR| MONTH | MONTHNAME| WEEKNUM | DATE | HOUR
    --2014| 5 | May | 25 | 08 |08
    Any suggestions please.
    Thanks!
    Rahman

    I made a very quick research and I see in this blog post
    http://www.jamesserra.com/archive/2011/08/microsoft-sql-server-parallel-data-warehouse-pdw-explained/
    that  It also uses its own query engine and not all features of SQL
    Server are supported.  So, you might not be able to use all your DBA tricks.  And you wouldn’t want to build a solution against SQL Server and then just hope to upsize it to Parallel Data Warehouse Edition.
    So, it is quite possible that this function doesn't exist in PDW version of SQL
    Server. In this case you may want to implement case based month name or do it in the client application.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Splitting of column into furthur subcolumn's into an ALV list

    Hi All,
      I've to display the data in a alv grid in Such format.
    category
    name
    age
    |--|-|
    sc
    st
    As far as i know there is no way available  to split the column headinng furthur into subheadings.
      But any how if it is possible please tell me.
      Note : The above displayed list is just an eaxmple there may be dynamically furthur subdivision of it's heading.
    --Amit

    Amit,
    Its not possible to merge neither the headings nor the columns as such.
    Regards,
    Ravi

  • Splitting one column into 4 columns

    Hi,
      I want to split one column into 4 columns as shown below.
    parameters
    PanelPanel=MP01110201&YearYear=2013&Source=1&UserID=aad2779
    PanelPanel=MP12100173&YearYear=2013&Source=1&UserID=aac6440
    it should be display as 
    panel                      yearyear                source              userid
    MP01110201           2013                            1                    aad2779
    MP12100173           2013                            1                    aac6440
    there will be thousands of rows in the column. Can anybody help how to split it as shown.The length may very from row to row
    Thanks for your help.........
    BALUSUSRIHARSHA

    It is working...thank u very much... I found one more issue here
    PanelPanel=MP01110201&YearYear=2013&Source=1&UserID=aad2779
    PanelPanel=MP11100070&Source=1&PNR=2&YearYear=2014&UserID=ddc1535
    PanelPanel=MP11101276&Source=1&YearYear=2014&PNR=2&UserID=ddc1565
    I found 3 kinds of formats in the same column... I didn't observe the data carefully while posting the
    question..sorry about that. In this case if we need to show as
    panel                      yearyear                source
                 userid
    MP01110201           2013                            1                    aad2779
    MP11100070           2014                           1                    ddc1535
    MP11101276           2014                
              1                    ddc1565
    is it possible to filter like this? Should we use any case statement in query while we have diff formats
    like this?
    BALUSUSRIHARSHA

Maybe you are looking for

  • IDVD & iMovie?

    i'm not in the right forum but i could not find the place to put this in? or  that Forum has gone missing cause of the Upgrade? I Have a few DVD Movies I Want to Burn them onto My Apple 24inch iMac Computer how do I Do it? in 2009 I Was at The Apple

  • In FF 23.0, Bookmarks (with dropdown menu) does not stick.

    Why would mozilla peeps would make this very useful button disappear? In what way it helps the users? It looks like their Vista moment. For now, I have re-installed FF 22.0 version. Hope they fix this bug soon.

  • Is the power cord box thing suppose to get SUPER hot?

    mine is super hot like its hard to even hold makes my desk turn really hot too.

  • Problem with worklist...

    Hi, Guru We have create a WebForm to approve/reject workitens. We have one task (TS90000011) linked to the transaction YWF90000004_APROV, this transaction is associated to the service Z_BID_APROVAL. Our problem is when we enter on the portal and chec

  • BT have messed up my billing and won't rectify it ...

    Need help folks (or if somebody from BT can PM I can give the ticket number as I really need this checked) since I came back to BT? I been paying monthly. Not a problem (came back in janurary and everything was going fine) For whatever reason though?