Mapping a dimension to multiple columns

Hi
Is it possible to map a single dimension to multiple columns iin oracle olap ?

No. This is very different from your original question. It seemed like you were asking if multiple columns can be used in the dimension mapping. Of course the answer is yes – it is designed that way.
But re-using a single dimension multiple times in a cube makes no sense. You have to ask yourself if all 10 dimensions have the same business meaning to the end user. If all 10 dimensions have the same meaning, then you really only have 1 dimension. But if the meanings differ, then you need 10 separate dimensions.
It may look like the dimension values are 0 and 1 in the table, but their meanings probably differ wildly (i.e. male/female; processed/unprocessed; cash/credit; true/false; east/west; sales associate/sales manager; etc.).

Similar Messages

  • Dimension usage multiple columns

    In the Data source view, it is possible to create a relationship between a fact and dimension with multiple columns.  How is this handled in the dimension usage pane? Can I create a dimensions that relates to a fact on multiple columns?
    John Schroeder

    Yes it is possible to have multi column relationships in SSAS multidimensional.
    If you create the relationship in the DSV then when you create the cube the dimensions usage will pick up the columns in the relationship. If the cube already exists - when you add a dimension that has multiple columns in it's key attribute you can pick
    which two columns in the fact should be used to link to the dimension.
    http://darren.gosbell.com - please mark correct answers

  • Mapping multiple columns of a table to single dimension using odi

    Hi John,
    Can we map multiple columns of a table to a single dimnesion?
    For example, in RDBMS, for the employee details, Grade position etc will be in different columns, and in Planning these would be as members of one dimension.
    So while loading data from oracle to essbase can we map these multiple columns to single dimension?
    If yes how?

    Hi,
    In your staging area/target you can concatentate the columns.
    So in your interface and on your target datastore, pick the column which is going to hold the details of the concatenation.
    Then in the expression editor use the CONCAT function, or you could use ||
    eg CONCAT(<sourceCol1>, <sourceCol2>)
    or <sourceCol1> || <sourceCol2>
    obviously you need to change the information between <sourceCol1> to your source datastore column
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Multiple Columns in Integration Script

    Hi All
    I am looking at data integration from R12 to HFM, my client has decided not to use ERPi and instead is opting for custom built processes culminating in an FDM integration script to pull data from an ODI staging table / view (please don't comment on that bit I have tried to advise them!)
    My issue is that when loading their TB data they want to do so in both entered and functional currency (members on the Custom4 dimension in HFM). What I am not sure about and would like some advice on is whether or not it is possible to have a multi-load style integration script with two data columns as I would be able to for file imports or whether I am limited to only 1 data column?
    If limited I assume I can amend my integration script to loop through the recordset twice and pick up different data columns each time to create the second record?
    Any help will be greatly appreciated :-)
    Regards
    Stu

    i know your request is old but you can use the pivot unpivot function to transpose your multiple columns into lines in a temporary table. I do that for debit/credit/balance situations :-)

  • Multiple columns in a data file, but accounts not periods

    Hi there,
    A very quick question.
    If I have a data file with, for example AcctDetail down the side and accounts across the top, am I right in thinking I can't load like this? Is it only periods that can be in multiple columns?
    I'm trying to adapt an existing file, without changing it too much, but I think this might be beyond BPC!
    Thanks,
    Jason

    Hi there,
    The data I'm loading is actually Intercompany data for one unit, for one period.
    So I have my affiliate (or counterparty, whatever term you use) down the rows, and the designated intercompany accounts across the top.
    I don't need multiple columns for periods, as I'm only loading one period, but I would prefer to use multiple columns for Accounts dimension instead.
    I know I can nest affiliates and accounts in the rows, but as I mentioned I would rather avoid changing the data file as much as possible.
    Hope that make sense!
    Thanks,
    Jason

  • Indexing multiple columns in multiple tables

    I have a multiple tables in which I want to search. I need to do text search that supports fuzzy logic for which I've currently set up a context index using the user_datastore. I also need to search columns such as numbers/dates/timestamps which from what I understand is not supported with the context search. I'm looking at setting up a second index of type ctxcat for this purpose - but I will need to index multiple columns in multiple tables. Is this possible?
    Can someone advise on the best way to create indexes and search when a table schema such as the following exists. I've tried to keep it simple by just giving a few example columns and tables.
    Order Table
    - Has columns related to the order details - order name (varchar2), description (varchar2), date order placed (timestamp), date order completed (date), order amount (number), customer Id
    Customer Table
    - Has columns related to the customer information - customer name, address, city, state, telephone etc (all varchar2 fields)
    Items Table
    - Has details about the items being ordered - item name (varchar2), item description (varchar2), cost (number) etc
    Order-Item Table
    - Table that maps an order to the items in that order - orderId, itemId, quantity
    Comments Table
    - Logs any comments with the customer - comment description (varchar2), call type (varchar2), comment date (timestamp)
    Currently with the Context index, I have it set up so I can search all text columns in all tables for a search term. This works fine.
    I now need to be able to do more advanced searches, where I can search for a specific text in all orders as well as orders created after a certain date or orders above a certain amount or orders with a item quantity purchase of more that 10. The text has to be searched across the all text columns in all tables. How can I achieve this with Oracle Text?

    There was a similar discussion with various ideas that may help you here:
    How can I make CONTAINS query work for a date range

  • Budget Scenarios - multiple columns

    Hi,
    i have a question and I hope you can help me.
    John-Michael Davis already helped me but what he told me did not help me much unfortunately, because what he told me, was done:
    "I suspect that you have enabled cost accounting in one database and not the other. You can enable cost accounting from system initialization -> Settings -> Cost Accounting Tab."
    I have two databases in different environments. In one, the budget can appear in multiple columns but another can not. In this issue, just put the sequence of steps do i try to put the columns of the Cost Accounting.
    What am I doing wrong?
    I'll explain through pictures, because it's more simple for me to explain.
    This image (from another database), appears the extra columns:
    The sequence that I do to appear the columns:
    General Settings - Cost Account using 2 dimensions:
    General Settings - Budget defined:
    Chart of Accounts -> G/L Accounts master data extension check box
    2 Cost Centers for different Dimensions:
    Distribution Rules of the 2 Cost Centers:
    The distribution rules associate at the Dimension "Areas" that correspond at the first Dimension don't present Stelle_z -> Centro Geral?
    Table of Cost Centers and Distribution Rules for the two Dimensions
    Cost Center Hierarchy for two Dimensions
    A Small example of Reports:
    Cost Center Report
    Distribution Report
    Cost Accounting Summary Report
    Budget versus Cost Accounting
    Budget Scenarios - Setup
    Budget Scenarios – Setup – > In this it's missing field "Dimension" and "Cost Accounting Columns", so this not possible across other distribution rules (cost center)
    Thanks,
    Luís Pontes

    Hi,
    Maybe this post is very confusing, so i will summarize:
    in my budget, i want to have the option of Cost Accounting, but I cannot.
    I already activated the option Use Multidimensions but I still do not see the columns.
    Does anyone know what should I do?
    Or is it a mistake SAP?
    Thanks,
    Luís Pontes

  • Move multiple columns in jtable

    I have multiple tab and each tab have a table with multiple columns. I move like this for example-
    col1 col2 col3 col4 col5 col6 col7 col8 col9
    after columns move
    col2 col1 col3 col5 col4 col6 col8 col7 col9
    I save table and get it, it works fine. But when i move columns like this-
    col4 col3 col5 col1 col6 col2 col7 col8 col9
    it never work as i save and get table. please tell what's wrong in below code.
    here are the codes-
    Table save code-
    try {
      Map<String, Map<String, Vector<Object>>> tableMap = new HashMap<String, Map<String, Vector<Object>>>();
      private static Map<String, Object> tables = new HashMap<String, Object>();
      Set<String> tabNames = tables.keySet();
      for (String tabName : tabNames) {
      JTable tab = (JTable) tables.get(tabName);
      Map<String, Vector<Object>> colNameValues = new HashMap<String, Vector<Object>>();
      Enumeration<TableColumn> tabCols = tab.getColumnModel()
      .getColumns();
      while (tabCols.hasMoreElements()) {
      Vector<Object> colums = new Vector<Object>();
      TableColumn col = tabCols.nextElement();
      int modelIndex = col.getModelIndex();
      int viewIndex = tab.convertColumnIndexToView(modelIndex);
      String field = Utils.toString(col.getIdentifier());
      Integer width = col.getWidth();
      if (isTableSelected) {
      boolean visible = !(viewIndex == -1 || col.getWidth() == 0);
      colums.add(visible); // pos 0 visible
      colums.add(field); // pos 1 field
      colums.add(width); // pos 2 width
      colums.add(modelIndex); // pos 3 model index
      colums.add(tab.convertColumnIndexToView(modelIndex)); // pos
      // 4
      // view
      // index
      colNameValues.put(field, colums);
      tableMap.put(tabName, colNameValues);
      if (dataStore.isColumnsSelected()) {
      if (personalizedDataStore != null) {
      Map<String, Map<String, Vector<Object>>> mapOld = personalizedDataStore
      .getInstructionTable();
      if (mapOld != null) {
      if (mapOld.size() > 0) {
      Set<String> oldTabNames = mapOld.keySet();
      for (String oldTabName : oldTabNames) {
      if (!tableMap.containsKey(oldTabName)) {
      tableMap.put(oldTabName,
      mapOld.get(oldTabName));
      dataStore.setInstructionTable(tableMap);
    code for get Table-
    private void applyPesonalizeSettings(String tabName, JTable tab) {
      if (!" ".equals(tabName)) {
      if (personalizedDataStore != null) {
      Map<String, Map<String, Vector<Object>>> oldTables = personalizedDataStore
      .getInstructionTable();
      for (int viewIndex = 0, count = tab.getRowCount(); viewIndex < count; viewIndex++) {
      if (oldTables != null) {
      Map<String, Vector<Object>> oldTabCols = oldTables
      .get(tabName);
      Enumeration<TableColumn> tableColumns = tab
      .getColumnModel().getColumns();
      while (tableColumns.hasMoreElements()) {
      TableColumn col = tableColumns.nextElement();
      String field = Utils.toString(col.getIdentifier());
      if (oldTabCols != null) {
      if (oldTabCols.containsKey(field)) {
      boolean vis = (Boolean) oldTabCols.get(field)
      .get(0);
      int prefWidth = (Integer) oldTabCols.get(field)
      .get(2);
      int modelInd = (Integer) oldTabCols.get(field)
      .get(3);
      int viewInd = (Integer) oldTabCols.get(field)
      .get(4);
      // setting visible
      if (!vis) {
      tab.getColumn(field).setMinWidth(0);
      tab.getColumn(field).setMaxWidth(0);
      tab.getColumn(field).setPreferredWidth(0);
      } else {
      // setting column width
      tab.getColumn(field).setPreferredWidth(
      prefWidth);
      // setting index
      if (modelInd != viewInd) {
      tab.moveColumn(
      tab.convertColumnIndexToView(modelInd),
      viewInd);
    here is the code for set table change property with popup-
    @Override
      protected void doOK() {
      Map<String, Vector<Object>> labelAndRow = new HashMap<String, Vector<Object>>();  //req 22
      for (int viewIndex = 0, count = super.getRowCount(); viewIndex < count; viewIndex++) {
      Vector<Object> row = super.getRow(viewIndex);
      boolean visible = (Boolean) row.get(0);
      String label = (String) row.get(1);
      String field = (String) row.get(2);
      labelAndRow.put(field,row); //req 22
      Integer modelIndex = (Integer) row.get(3);
      Integer width = (Integer) row.get(4);                              
      TableColumn col = jxtable.getColumn(field);
      if (visible) {
      if (width <= 0) {
      width = 75;
      if (width != col.getWidth()) {
      col.setMinWidth(15);
      col.setMaxWidth(1000);
      col.setPreferredWidth(width);
      } else {
      col.setMinWidth(0);
      col.setMaxWidth(0);
      col.setWidth(0);
      col.setPreferredWidth(0);
      col.setHeaderValue(label);
      jxtable.moveColumn(jxtable.convertColumnIndexToView(modelIndex), viewIndex);
      jxtable.moveColumn(jxtable.convertColumnIndexToView(modelIndex), viewIndex);
      super.dispose();
      for (TableColumn col : (List<TableColumn>) jxtable.getColumns()) {
      int modelIndex = col.getModelIndex();
      int viewIndex = jxtable.convertColumnIndexToView(modelIndex);
      String label = Utils.toString(col.getHeaderValue());
      String field = Utils.toString(col.getIdentifier());
      Integer width = col.getWidth();                       
      boolean visible = !(viewIndex == -1 || col.getWidth() == 0);
      dialog.getTableModel().addRow(new Object[]{visible, label, field, modelIndex, width});
      dialog.setVisible(true);

    I have multiple tab and each tab have a table with multiple columns. I move like this for example-
    col1 col2 col3 col4 col5 col6 col7 col8 col9
    after columns move
    col2 col1 col3 col5 col4 col6 col8 col7 col9
    I save table and get it, it works fine. But when i move columns like this-
    col4 col3 col5 col1 col6 col2 col7 col8 col9
    it never work as i save and get table. please tell what's wrong in below code.
    here are the codes-
    Table save code-
    try {
      Map<String, Map<String, Vector<Object>>> tableMap = new HashMap<String, Map<String, Vector<Object>>>();
      private static Map<String, Object> tables = new HashMap<String, Object>();
      Set<String> tabNames = tables.keySet();
      for (String tabName : tabNames) {
      JTable tab = (JTable) tables.get(tabName);
      Map<String, Vector<Object>> colNameValues = new HashMap<String, Vector<Object>>();
      Enumeration<TableColumn> tabCols = tab.getColumnModel()
      .getColumns();
      while (tabCols.hasMoreElements()) {
      Vector<Object> colums = new Vector<Object>();
      TableColumn col = tabCols.nextElement();
      int modelIndex = col.getModelIndex();
      int viewIndex = tab.convertColumnIndexToView(modelIndex);
      String field = Utils.toString(col.getIdentifier());
      Integer width = col.getWidth();
      if (isTableSelected) {
      boolean visible = !(viewIndex == -1 || col.getWidth() == 0);
      colums.add(visible); // pos 0 visible
      colums.add(field); // pos 1 field
      colums.add(width); // pos 2 width
      colums.add(modelIndex); // pos 3 model index
      colums.add(tab.convertColumnIndexToView(modelIndex)); // pos
      // 4
      // view
      // index
      colNameValues.put(field, colums);
      tableMap.put(tabName, colNameValues);
      if (dataStore.isColumnsSelected()) {
      if (personalizedDataStore != null) {
      Map<String, Map<String, Vector<Object>>> mapOld = personalizedDataStore
      .getInstructionTable();
      if (mapOld != null) {
      if (mapOld.size() > 0) {
      Set<String> oldTabNames = mapOld.keySet();
      for (String oldTabName : oldTabNames) {
      if (!tableMap.containsKey(oldTabName)) {
      tableMap.put(oldTabName,
      mapOld.get(oldTabName));
      dataStore.setInstructionTable(tableMap);
    code for get Table-
    private void applyPesonalizeSettings(String tabName, JTable tab) {
      if (!" ".equals(tabName)) {
      if (personalizedDataStore != null) {
      Map<String, Map<String, Vector<Object>>> oldTables = personalizedDataStore
      .getInstructionTable();
      for (int viewIndex = 0, count = tab.getRowCount(); viewIndex < count; viewIndex++) {
      if (oldTables != null) {
      Map<String, Vector<Object>> oldTabCols = oldTables
      .get(tabName);
      Enumeration<TableColumn> tableColumns = tab
      .getColumnModel().getColumns();
      while (tableColumns.hasMoreElements()) {
      TableColumn col = tableColumns.nextElement();
      String field = Utils.toString(col.getIdentifier());
      if (oldTabCols != null) {
      if (oldTabCols.containsKey(field)) {
      boolean vis = (Boolean) oldTabCols.get(field)
      .get(0);
      int prefWidth = (Integer) oldTabCols.get(field)
      .get(2);
      int modelInd = (Integer) oldTabCols.get(field)
      .get(3);
      int viewInd = (Integer) oldTabCols.get(field)
      .get(4);
      // setting visible
      if (!vis) {
      tab.getColumn(field).setMinWidth(0);
      tab.getColumn(field).setMaxWidth(0);
      tab.getColumn(field).setPreferredWidth(0);
      } else {
      // setting column width
      tab.getColumn(field).setPreferredWidth(
      prefWidth);
      // setting index
      if (modelInd != viewInd) {
      tab.moveColumn(
      tab.convertColumnIndexToView(modelInd),
      viewInd);
    here is the code for set table change property with popup-
    @Override
      protected void doOK() {
      Map<String, Vector<Object>> labelAndRow = new HashMap<String, Vector<Object>>();  //req 22
      for (int viewIndex = 0, count = super.getRowCount(); viewIndex < count; viewIndex++) {
      Vector<Object> row = super.getRow(viewIndex);
      boolean visible = (Boolean) row.get(0);
      String label = (String) row.get(1);
      String field = (String) row.get(2);
      labelAndRow.put(field,row); //req 22
      Integer modelIndex = (Integer) row.get(3);
      Integer width = (Integer) row.get(4);                              
      TableColumn col = jxtable.getColumn(field);
      if (visible) {
      if (width <= 0) {
      width = 75;
      if (width != col.getWidth()) {
      col.setMinWidth(15);
      col.setMaxWidth(1000);
      col.setPreferredWidth(width);
      } else {
      col.setMinWidth(0);
      col.setMaxWidth(0);
      col.setWidth(0);
      col.setPreferredWidth(0);
      col.setHeaderValue(label);
      jxtable.moveColumn(jxtable.convertColumnIndexToView(modelIndex), viewIndex);
      jxtable.moveColumn(jxtable.convertColumnIndexToView(modelIndex), viewIndex);
      super.dispose();
      for (TableColumn col : (List<TableColumn>) jxtable.getColumns()) {
      int modelIndex = col.getModelIndex();
      int viewIndex = jxtable.convertColumnIndexToView(modelIndex);
      String label = Utils.toString(col.getHeaderValue());
      String field = Utils.toString(col.getIdentifier());
      Integer width = col.getWidth();                       
      boolean visible = !(viewIndex == -1 || col.getWidth() == 0);
      dialog.getTableModel().addRow(new Object[]{visible, label, field, modelIndex, width});
      dialog.setVisible(true);

  • Dimensions with multiple joins

    Hi,
    Discoverer Desktop 9.0.2
    Discoverer Administrator 9.0.2
    OWB 9.2
    I have imported the dimensions and facts from OWB EEX file.
    While I trying to create a report based on the dimensions, I found the problem in Dimensions used multiple times against the fact table.
    For example,
    I use the Time Dimension (TIME_DIM) for assigned date, open Date and Close dt. My fact table will have the foreign keys for these 3 columns.
    TIME_DIM
    DAY_ID
    DAY_DAY
    DAY_MONTH
    DAY_YEAR
    data
    DAY_ID DAY_DAY DAY_MONTH DAY_YEAR
    1 01-JAN-04 JANUARY 2004
    2 01-FEB-04 FEBRUARY 2004
    3 01-MAR-04 MARCH 2004
    FACT_TABLE
    DAY_ID
    DAY_ID2
    DAY_ID3
    Data
    DAY_ID DAY_ID2 DAY_ID3
    1 2 3
    1 1 2
    While I am creating the report, in 'work book wizard: step 2' shows the TIME_DIM only one time, also it allows to select only one time with any one of these keys. Whereas I need to select the time dimension for each of the time keys in fact table.
    Is their any work around to get these values in my reports?
    I mean
    My report will look like,
    ASSIGNED DT OPEN DT CLOSE DT
    01-JAN-04 01-FEB-04 01-MAR-04
    01-JAN-04 01-JAN-04 01-FEB-04
    I tried with creating hierarchies, modifying the SQL to add these keys manually and then import SQL, doesnt work at all.
    Please help me !!
    Thanks,
    Shree

    You have to load the table up several times into the EUL and create links to the different column in your fact table.

  • [38073] dimension has multiple leaf levels which are not identical

    Hi,
    I am trying to implement a time dimension with 2 source tables.
    The time dimension is from minute to year where logical table includes 2 source tables :
    Source table#1 : Year,month,week,day
    Source table#2: hour,minute (minute is a leaf level and chronological key)
    When i try to check-in i got the following error: [38073] dimension has multiple leaf levels with are not identical.
    Thank you.
    Michael

    Hi RM
    i am able to create multiple hirerachy in time dimension and assigned time_id as chronological key which is at the dimension detail level and acting as shared child level for both of them......
    I have created AGO function for calendar year as
    AGO(Test."Fact".amount_sold, Test."Time Dim"."Calendar Year", 1)
    but when i have used AGO column in answers i am getting below mentioned error:-
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22046] To use AGO function, the query level ('Calendar Year, Fiscal Year') must be a static level. (HY000)
    any suggestion would be appreciated to solve this.
    thanks & regards

  • Universe Builder - Setting Measurement Property to Multiple columns

    Using the Universe Designer, when I add a table to my universe I would like to be able to set multiple columns to be measurements instead of having to click on each column and slect object properties and then select measurement instead of dimension.  Is there any way I can do this?
    Thanks

    Hi,
    It is only possible using the Designer SDK.
    By the way there is an internal application developed with Designer SDK that does it.
    Didier

  • Drill-down to multiple columns at same time

    Hello,
    Is it possible to simultaneously drill down to multiple columns on the same level with one click? I have several attributes that the user will want to see together at all times, so I want to be able to drill from level1 to level2a,2b, and 2c with one click.
    Thanks,
    Elliot

    This drilling down to all the levels may not be available with the OBIEE drill level based hierarchy feature OOTB but as an alternative you can try this at you DB level to create a hierarchy within you data using START WITH and CONNECT BY PRIOR to generate the parent->child levels hierarchy within the view instead of creating multiple hierarchical columns.
    Or may be you can try to create separate columns in a table for each hierarchy level. That table could either be in the database or be a logical one in the repository. For example:
    Level 1 Level 2 Level 3 Description
    1 2A 3A
    1 2A 3B
    1 2B 3A
    1 2B 3B
    etc
    You then create separate reports for each level, so one report has only level1 in it for this dimension, another report has levels 1 an 2 and a third report has levels 1, 2 and 3 etc.
    In each report you put an action link on the levels' cells so that if you click on them you drill up or down by displaying a new report with either less or more level columns.
    Hope this helps. Pls mark if it does.
    Thanks,
    SVS

  • Split flat file column data into multiple columns using ssis

    Hi All, I need one help in SSIS.
    I have a source file with column1, I want to split the column1 data into
    multiple columns when there is a semicolon(';') and there is no specific
    length between each semicolon,let say..
    Column1:
    John;Sam;Greg;David
    And at destination we have 4 columns let say D1,D2,D3,D4
    I want to map
    John -> D1
    Sam->D2
    Greg->D3
    David->D4
    Please I need it ASAP
    Thanks in Advance,
    RH
    sql

    Imports System
    Imports System.Data
    Imports System.Math
    Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
    Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
    Imports System.IO
    Public Class ScriptMain
    Inherits UserComponent
    Private textReader As StreamReader
    Private exportedAddressFile As String
    Public Overrides Sub AcquireConnections(ByVal Transaction As Object)
    Dim connMgr As IDTSConnectionManager90 = _
    Me.Connections.Connection
    exportedAddressFile = _
    CType(connMgr.AcquireConnection(Nothing), String)
    End Sub
    Public Overrides Sub PreExecute()
    MyBase.PreExecute()
    textReader = New StreamReader(exportedAddressFile)
    End Sub
    Public Overrides Sub CreateNewOutputRows()
    Dim nextLine As String
    Dim columns As String()
    Dim cols As String()
    Dim delimiters As Char()
    delimiters = ",".ToCharArray
    nextLine = textReader.ReadLine
    Do While nextLine IsNot Nothing
    columns = nextLine.Split(delimiters)
    With Output0Buffer
    cols = columns(1).Split(";".ToCharArray)
    .AddRow()
    .ID = Convert.ToInt32(columns(0))
    If cols.GetUpperBound(0) >= 0 Then
    .Col1 = cols(0)
    End If
    If cols.GetUpperBound(0) >= 1 Then
    .Col2 = cols(1)
    End If
    If cols.GetUpperBound(0) >= 2 Then
    .Col3 = cols(2)
    End If
    If cols.GetUpperBound(0) >= 3 Then
    .Col4 = cols(3)
    End If
    End With
    nextLine = textReader.ReadLine
    Loop
    End Sub
    Public Overrides Sub PostExecute()
    MyBase.PostExecute()
    textReader.Close()
    End Sub
    End Class
    Put this code in ur script component. Before that add 5 columns to the script component output and name them as ID, col1, co2..,col4. ID is of data type int. Create a flat file destination and name it as connection and point it to the flat file as the source.
    Im not sure whats the delimiter in ur flat file between the 2 columns. I have use a comma change it accordingly.
    This is the output I get:
    ID Col1
    Col2 Col3
    Col4
    1 john
    Greg David
    Sam
    2 tom
    tony NULL
    NULL
    3 harry
    NULL NULL
    NULL

  • Setting different Tabel Cell SemanticColor for Multiple Columns of each row

    Hi,
    I have requirement of setting different colors to different columns for each row based on some condition in table data.
    The data to table is coming from model, hence table is mapped to model node and attributes.
    I have created Seperate Node CellColorNode with attribue CellClr1 and CellClr2 of type TextView Semantic Color.
    Set the calculated, read only attribute to True. Mapped table columns text view to the CellColorNode->CellClr1 and CellColorNode-->CellClr2 correspondingly.
    Now, my query is how do i set the colors to CellClr1 and CellClr2 attributes. As I need to set the color for multiple columns of each table row.
    Is it in method getColorCellCellClr generated? Any  Example Code?

    Its resolved by following below link
    http://scn.sap.com/thread/158286

  • Comparison of multiple column values with a single column value

    I have two separate tables say Tab1 and Tab2
    I want to select some datas , which is common to both the tables.
    In tab1 , there is a column 'STATE' and it's value is 'A'
    In tab2, there are multiple columns for the state, say STATE_A,STATE_B, STATE_C ETC and a row is present with the following details
    STATE_A = 1, STATE_B =1 ,STATE_C =0,STATE_D=1
    I need to select STATE when STATE_A ='1',
    if my STATE='B', this STATE has to be selected since STATE_B =' 1', similraly
    if my STATE='D', this STATE has to be selected since STATE_D =' 1',
    If my STATE='C', STATE_C should not get selected since it's '0'.
    Is it possible to do this in a single SELECT statement, where I have some other checks also or else how can I achieve it?

    Maybe this will help
    Select * from STATE_MAS ;
    STATE
    A
    B
    D
    F
    H
    Select * from STATE_CHILD
      STATE_A   STATE_B   STATE_C   STATE_D   STATE_E   STATE_F   STATE_G   STATE_H   STATE_I   STATE_J
            1         0         0         1         1         0         0         0         0         0
    CREATE OR REPLACE FUNCTION GET_STATE (P_VAL VARCHAR) RETURN NUMBER IS
    V_SQL VARCHAR2(200);
    V_COL VARCHAR2(35);
    P_RETURN NUMBER ;
    BEGIN
    V_COL := 'STATE_'||P_VAL;
    V_SQL := 'SELECT 1 FROM STATE_CHILD WHERE '||V_COL||' = 1 ';
    EXECUTE IMMEDIATE  V_SQL INTO P_RETURN ;
    RETURN P_RETURN ;
    END;
    SELECT STATE FROM STATE_MAS
    WHERE GET_STATE(STATE) = 1 ;
    STATE
    A
    D

Maybe you are looking for