Outer-join merge of data sources

I need to join the data from our primary universe to various sets of Excel data.  The universe contains the primary, core data (employees).  The Excel data will contain additional dimensions and measures.  The "Merge" feature works well for analyzing the measures found in the Excel file, but I need to be able to slice my data by dimensions included in the Excel file.  I receive the "data not compatible" warning when I try to drop a dimension from the Excel file into a table that contains dimensions from the primary universe.
Example:  The universe contains the employees' Employee ID and Country.  The Excel file contains the employees' Employee ID and City.  I merged the two data sets on the Employee ID.  I need to see a count of employees by Country and City but Webi doesn't allow me to put Country and City into the same table because they are both dimensions and Country is sourced from the universe whereas City is sourced from the Excel file.
Does anyone have ideas on how to make this work?

Hi,
As mention by Gaurav Try this .
You have Created Merge Dimension on [Emp_ID] .
Create 2 variables both will be detail object & Associated dimension will be [Emp_Id] (Merged) .
v_Country = Q1.[Country]
v_City =  Q2.[City]
now add
[Emp_Id] (Merged) , v_Country , v_City in one table .

Similar Messages

  • Join two unrelated data sources

    Is it possible to join two unrelated data sourcesin OWB, if yes, how?
    The closest which comes to my mind is union (outer join) thru two proxy expressions with redundant column holders for reciprocal columns.
    But I am thinking, above would lead to excessive wastage.
    So is there a better way possible.
    Rgds,
    Deepak

    Deepak,
    I think there are 2 different things you are trying to achieve:
    1) With a grand total, something along the lines of:
    select emp1.empno
    , emp1.ename
    , count(emp2.empno) count_empno
    from emp1
    , emp2
    This query will retrieve a grant total, and because there is no relationship, you do not need a join condition. You do access the emp table twice.
    OWB would implement this like:
    select emp1.empno
    , emp1.ename
    , (select count(emp2.empno) from emp2) count_empno
    from emp1
    The other thing you seem to like to implement is a join on the customer_id, or similar for the simplified example, say on deptno in the emp table:
    select emp1.empno
    , emp1.ename
    , sum(emp2.sal) dept_sal_sum
    from emp1
    , emp2
    where emp1.deptno = emp2.deptno
    group by emp1.empno
    , emp1.ename -- this does not add anything, but...
    Again, the way OWB would implement this (something similar):
    select emp1.empno
    , emp1.ename
    , (select sum(emp2.sal)
    from emp2
    where emp2.deptno = emp1.deptno
    ) dept_sal_sum
    from emp1
    group by emp1.empno
    , emp1.ename -- this does not add anything, but...
    Anyway, so the way you would create this is by using the same source multiple times, include the aggregates and put in the join conditions appropriately.
    Hope this makes sense... and addresses the issue.
    Mark.

  • PREDICTION JOIN OPENQUERY against data source view does not work

    Hi,
     I am trying to follow the example in this link:
    http://technet.microsoft.com/en-us/library/ms132031.aspx
    to do a prediction join with a table defined in a data source view of our cube/mining structures.  No matter how I specify the table in the OPENQUERY statement I get: "OLE DB error: OLE DB or ODBC error: Invalid object name 'DataSourceView.dbo.TableName'.;
    42S02."  I've tried specifying the table name in 1, 2, and 3 parts, with and without the '[]' brackets but get the same error every time.  I thought something might be wrong with the table in the DSV so tried putting other tables in the query,
    but that produces the same error.  Any ideas on the problem?
    SELECT FLATTENED
            t.[Column1],
            t.[Column2],
            t.[Column3],
            PredictTimeSeries([ModelName].[Column3],5)
    From
      [ModelName]
    PREDICTION JOIN
      OPENQUERY([DataSourceView],
        'SELECT
            [Column1],
            [Column2],
            [Column3]
        FROM
          [DataSourceView].[dbo].[TableName]
        ') AS t
    ON
            [ModelName].[Column3] = t.[Column3]
    OLE DB error: OLE DB or ODBC error: Invalid object name 'R Staging.dbo.TestSet'.; 42S02."

    I want to be able to query a data source view table/named query.  This TechNet article seems to imply it is as simple as running the following in a DMX window:
         OPENQUERY ([MyDatasourceView],'select Column1 from DataSourceTable')
    I've also tried:
         select * from OPENQUERY ([MyDatasourceView],'select Column1 from DataSourceTable')
    Both result in:
        "Query (1, 1) Parser: The syntax for 'OPENQUERY' is incorrect."
    Can we query a DSV table from a DMX query directly with OPENQUERY, or does the OPENQUERY only work within a PREDICTION JOIN?  Seems like such a simple case for it not to work.
    Following the example in this article:
    http://technet.microsoft.com/en-us/library/ms132173.aspx

  • Unable to generate Power View report out of Multidimensional report data source

    Hi,
    I have created 'Report Data Source' connection to point to Multidimensional cube on Share Point site. But when I try to create a new Power View report out of it, I get following error message : 
    "An error occured while loading the model for the item or data source 'http://*********/PowerPivot Gallery/TestCube.rsds'. Verify that the connection information is correct and that you have permission to access the data source."
    I can see following message in the <moreInformation> section :
    <Source>Microsoft SQL Server 2012 Analysis Services</Source><Message>Errors in the metadata manager. The current model can only be expressed when the client is requesting tabular view metadata with VERSION restriction of 2.0 or later.</Message>
    Following are the System configurations :
    1) SSAS : SQL Server 2012 + SP2 (version 11.0.5058)
    2) Share Point 2013
    As mentioned in one of the MSDN documents this configuration supports creation of Power View reports on multidimensional cube.
    Can any one suggest what might be the issue?
    Thanks in advance!

    Hi Dipti,
    According to your description, you get the connection failure when creating a power view report, and it throws information "Errors in the metadata manager. The current model can only be expressed when the client is requesting tabular view metadata with
    VERSION restriction of 2.0 or later." Right?
    Based on the error message, the issue should be the SSRS on sharepoint metadata version mismatch when sending to SSAS. There's someone mentioned in a similar thread that this issue can be solved by installing the full package of CU4 for SP1.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/133558cd-ffc8-4608-ae45-fdff01770c6d/powerview-sql-2012-sp1-cu4-cannot-connect-to-dimensional-metadata-version-11?forum=sqlreportingservices
    Even you already have SP2 installed, it supposed included CU1~CU9 for SP1. However, it has reported that SP2 doesn't fix all bugs which supposed to be fixed in CU for SP1.
    SQL Server 2012 Service Pack 2 is available - but there's a catch!
    So please re-install the full CU4 for SP1, restart the services and try again.
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Outer join with effective date in peoplesoft query

    Hi,
    I'm trying to join two tables using outer join. Both tables are effective dated:
    Dept_Tbl: dept_id, status, effdt
    Tips_Tbl: dept_id, tips_id, effdt
    Not all records in Dept_Tbl are in Tips_Tbl. I need to get all active depts and their most recent tips_id if they have one.
    select a.dept_id, b.tips_id
    from dept_tbl a, tips_tbl b
    where a.status = 'Active'
    and a.effdt =
    (select max(a_ed.effdt) from dept_tbl a_ed
    where a.dept_id = a_ed.dept_id
    and a_ed.effdt <= SYSDATE)
    and b.dept_id(+) = a.dept_id
    and b.effdt =
    (select max(b_ed.effdt) from tips_tbl b_ed
    where b.dept_id = b_ed.dept_id
    and b.tips_id = b_ed.tips_id
    and b_ed.effdt <= SYSDATE)
    The query only returns records that are in both tables.
    Is there a way for outer join to work with effective dates?
    Thanks in advance,
    Reg

    Here is an example of one solution. Note the use of NVL on both sides of the equal sign since both sides could be NULL in the case of the outer join
    with dept_tbl as (select 1 dept_id, SYSDATE effdt FROM DUAL),
         tips_tbl as (select 1 dept_id, NULL effdt FROM DUAL)
    select a.effdt
      from dept_tbl a,
           tips_tbl b
    where b.dept_id(+) = a.dept_id
       and NVL(b.effdt, SYSDATE) = NVL((select max(b_ed.effdt)
                                          from tips_tbl b_ed
                                         where b.dept_id = b_ed.dept_id
                                           and b_ed.effdt <= SYSDATE), SYSDATE);
    EFFDT
    5/7/2007 3:25:00 PM

  • Need to specify LEFT OUTER JOIN while using data from logical database BRM?

    I'm trying to extract data for external processing using SQVI. The fields required are in tables BKPF (Document Header) and BSEG (document detail) so I'm using logical database BRM. Note: required fields include the SPGR* (blocking reasons) which don't appear to be in BSIS/BSAS/BSID/BSAD/BSIK/BSAK, hence I can't just use a Table Join on any of these but have to use BSEG, hence BRM.
    If the document type is an invoice, I also need to include the PO number from table EKKO (PO header), if present, hence I'd like to add this to the list. However, if I do this, it seems that some records are no longer display, e.g. AB documents.
    The interesting thing is that not all records are suppressed, so it's not a simple case of the logical database using an effective INNER JOIN, but the effect is similar.
    In any event, is there a way to specify that the link to table EKKO should be treated as an effective LEFT OUTER JOIN, i.e. records from BKPF/BSEG should be included irrespective of whether any records from EKKO/EKPO exist or not?
    Alternatively, is there some other way to get the SPGR* fields (for example) from BSEG and still join the BKPF? Of course, one solution is to use multiple queries, but I was hoping to avoid this.

    Thanks for everyone's responses, I know how to work around the problem with sql, I am wanting to see if there is a way to make the outer joins filter go in the join clause instead of the where clause with Crystal Reports standard functionality. 
    We have some Crystal Reports users that are not sql users, i.e. benefit specialists, payroll specialists and compensation analysts who have Crystal Reports.  I was hoping this functionality was available for them.  I just made my example a simple one, but often reports have multiple outer joins with maybe 2 or three of the outer joins needing a filter on them that won't make them into an inner join. 
    Such as
    Select person information
    outer join address record
    outer join email record
    outer join tax record (filter for active state record & filter for code = STATE )
    outer join pay rates record
    outer join phone#s  (filter for home phone#)
    I thought maybe the functionality may be available, that I just don't know how or where to use it.  Maybe it is just not available.
    If it is not available, I will probably need to setup some standard views for them to query, rather than expecting them to pull the tables together themselves.

  • Outer join two different dates

    I have a table that has some pre-aggregated dollar amounts.  Each record also has a date of fill and a file date.  I want to sum all records in the table by year/month of fill date and separately I want to use the same query results to sum by year/month
    of file date.  The problem I was initially having was that the query was not showing all dates January through December, but instead was only showing dates for which there was a record.  Makes sense, I get it, and I fixed that by using a cross join
    on a date table and left join on that table.  See below.  Pretty simple really.  My results have a record for every file date and a $0 amount if there is no file for that date.  However, I want the same thing for fill date.  If I don't
    have a file for January but I do have a fill for that date then I want to display that year/month with the dollar amount.  I hope this makes sense.
    The approaches I have tried thus far are to add a separate CTE for the fill date, joining to the same CTE twice (once for fill and once for file), and some crazy unions... all with no luck.
    Can anyone help me out please?
    Thanks!
    WITH dt
    AS (SELECT cdb.ID,
    cdb.RestoreDBName,
    cdb.DisplayName,
    d.Date
    FROM DataOperations.lkp.Dates AS d CROSS JOIN DataOperations.dbo.vwClientDatabases AS cdb
    WHERE d.Date BETWEEN '01-01-2013' AND DATEADD(day, -1 * DAY(CAST(GETDATE() AS DATE)), DATEADD(month, 1, CAST(GETDATE() AS DATE)))
    AND d.DayOfMonth = 1
    SELECT dtFile.RestoreDBName,
    dtFile.ID,
    YEAR(dtFile.Date) AS FileYear,
    MONTH(dtFile.Date) AS FileMonth,
    dtFile.Date AS FileDate,
    LEFT(CONVERT(VARCHAR, dtFile.Date, 120), 7) AS FileYearMonth,
    YEAR(rx.FillDate) AS FillYear,
    MONTH(rx.FillDate) AS FillMonth,
    CAST(CONVERT(VARCHAR, YEAR(rx.FillDate)) + '-' + CONVERT(VARCHAR, MONTH(rx.FillDate)) + '-01' AS DATE) AS FillDate,
    LEFT(CONVERT(VARCHAR, rx.FillDate, 120), 7) AS FillYearMonth,
    ISNULL(SUM(rx.TotalPayAmount), 0) AS TotalPayAmount
    FROM dt AS dtFile LEFT JOIN DataOperations.rpt.RxGrossPayAmountByDay AS rx ON rx.DBName = dtFile.RestoreDBName
    AND DATEADD(month, DATEDIFF(month, 0, rx.TapeFileDate), 0) = dtFile.
    [Date]
    LEFT JOIN DataOperations.dbo.vwClientDatabases AS cdb ON cdb.RestoreDBName = rx.DBName
    GROUP BY dtFile.RestoreDBName,
    dtFile.ID,
    YEAR(dtFile.Date) ,
    MONTH(dtFile.Date) ,
    dtFile.Date ,
    LEFT(CONVERT(VARCHAR, dtFile.Date, 120), 7) ,
    YEAR(rx.FillDate) ,
    MONTH(rx.FillDate) ,
    CAST(CONVERT(VARCHAR, YEAR(rx.FillDate)) + '-' + CONVERT(VARCHAR, MONTH(rx.FillDate)) + '-01' AS DATE),
    LEFT(CONVERT(VARCHAR, rx.FillDate, 120), 7)
    ORDER BY dtFile.RestoreDBName, YEAR(dtFile.Date), MONTH(dtFile.Date)

    Ok, how about this.
    WITH dtFile
    AS (SELECT dt.RestoreDBName,
    YEAR(dt.Date) AS Year,
    MONTH(dt.Date) AS Month,
    ISNULL(SUM(rx.TotalPayAmount), 0) AS TotalPayAmount
    FROM(
    SELECT cdb.ID,
    cdb.RestoreDBName,
    cdb.DisplayName,
    d.Date
    FROM DataOperations.lkp.Dates AS d CROSS JOIN DataOperations.dbo.vwClientDatabases AS cdb
    WHERE d.Date BETWEEN '01-01-2013' AND DATEADD(day, -1 * DAY(CAST(GETDATE()AS DATE)), DATEADD(month, 1, CAST(GETDATE()AS DATE)))
    AND d.DayOfMonth = 1
    )AS dt LEFT JOIN DataOperations.rpt.RxGrossPayAmountByDay AS rx ON rx.DBName = dt.RestoreDBName
    AND DATEADD(month, DATEDIFF(month,
    0, rx.TapeFileDate), 0) = dt.[Date]
    GROUP BY dt.RestoreDBName,
    YEAR(dt.Date) ,
    MONTH(dt.Date) ),
    dtFill
    AS (SELECT dt.RestoreDBName,
    YEAR(dt.Date) AS Year,
    MONTH(dt.Date) AS Month,
    ISNULL(SUM(rx.TotalPayAmount), 0) AS TotalPayAmount
    FROM(
    SELECT cdb.ID,
    cdb.RestoreDBName,
    cdb.DisplayName,
    d.Date
    FROM DataOperations.lkp.Dates AS d CROSS JOIN DataOperations.dbo.vwClientDatabases AS cdb
    WHERE d.Date BETWEEN '01-01-2013' AND DATEADD(day, -1 * DAY(CAST(GETDATE()AS DATE)), DATEADD(month, 1, CAST(GETDATE()AS DATE)))
    AND d.DayOfMonth = 1
    )AS dt LEFT JOIN DataOperations.rpt.RxGrossPayAmountByDay AS rx ON rx.DBName = dt.RestoreDBName
    AND DATEADD(month, DATEDIFF(month,
    0, rx.FillDate), 0) = dt.[Date]
    GROUP BY dt.RestoreDBName,
    YEAR(dt.Date) ,
    MONTH(dt.Date)
    SELECT dtFile.RestoreDBName,
    dtFile.Year AS FileYear,
    dtFile.Month AS FileMonth,
    dtFill.Year AS FillYear,
    dtFill.Month AS FillMonth,
    dtFile.TotalPayAmount as FileTotalPayAmount,
    dtFill.TotalPayAmount as FillTotalPayAmount
    FROM dtFile FULL OUTER JOIN dtFill ON dtFile.RestoreDBName = dtFill.RestoreDBName
    ORDER BY dtFile.RestoreDBName, dtFile.Year, dtFile.Month
    I think I'm getting close, but there's some odd results for the file total pay amount.  Here are the partial results for the first RestoreDBName in my results.  I have some repeating and I'm not sure what value to use.  Do I use FillTotalPayAmount
    PLUS FileTotalPayAmount or one or the other or what?  Am I joining on the right fields?
    Thank you so much.  This is a big help and a great learning lesson too!
    FileYear
    FileMonth
    FillYear
    FillMonth
     FileTotalPayAmount 
      FillTotalPayAmount 
    2013
    1
    2013
    1
    655.5
    711.7
    2013
    1
    2013
    2
    655.5
    658.5
    2013
    1
    2013
    3
    655.5
    715.2
    2013
    1
    2013
    4
    655.5
    744.5
    2013
    1
    2013
    5
    655.5
    765.8
    2013
    1
    2013
    6
    655.5
    718.8
    2013
    1
    2013
    7
    655.5
    792.8
    2013
    1
    2013
    8
    655.5
    781.4
    2013
    1
    2013
    9
    655.5
    748.6
    2013
    1
    2013
    10
    655.5
    822.4
    2013
    1
    2013
    11
    655.5
    752.2
    2013
    1
    2013
    12
    655.5
    839.0
    2013
    1
    2014
    1
    655.5
    702.9
    2013
    1
    2014
    2
    655.5
    7.3
    2013
    1
    2014
    3
    655.5
    0.0
    2013
    1
    2014
    4
    655.5
    2013
    2
    2013
    1
    672.7
    711.7
    2013
    2
    2013
    2
    672.7
    658.5
    2013
    2
    2013
    3
    672.7
    715.2
    2013
    2
    2013
    4
    672.7
    744.5
    2013
    2
    2013
    5
    672.7
    765.8
    2013
    2
    2013
    6
    672.7
    718.8
    2013
    2
    2013
    7
    672.7
    792.8
    2013
    2
    2013
    8
    672.7
    781.4
    2013
    2
    2013
    9
    672.7
    748.6
    2013
    2
    2013
    10
    672.7
    822.4
    2013
    2
    2013
    11
    672.7
    752.2
    2013
    2
    2013
    12
    672.7
    839.0
    2013
    2
    2014
    1
    672.7
    702.9
    2013
    2
    2014
    2
    672.7
    7.3
    2013
    2
    2014
    3
    672.7
    0.0
    2013
    2
    2014
    4
    672.7
    2013
    3
    2013
    1
    630.6
    711.7
    2013
    3
    2013
    2
    630.6
    658.5
    2013
    3
    2013
    3
    630.6
    715.2

  • Join conditions in data source - Configurable sub scenario

    Hello Experts,
    In configurable sub scenario, when I try to join 2 tables (EKKO and EKPO), I am getting a warning message saying that "Redundant Join Conditions proposed; manual maintenance required" and the data source is not fetching any data.
    Could anyone suggest what could be the reason
    Regards,
    Ramakrishna Chaitanya

    Hello Ramakrishna,
    Alessandro is right. EKKO-EBELN and EKPO-EBELN is the redundant condition. Just remove manually this row from the join condition and the warning message dissapears.
    Best Regards,
    Fernando

  • Can CLOUD data source be joined to a combined data source?

    Hi, experts,
           I have created a cloud data source and I am trying to join the cloud data source with a combined data source.
           I am having a problem.
               This is how I joined the two data sources. I checked the Joined Data Source. It is ok.
              When I open the report,
              The error is just like this.
              The error is just one line . So , I simply dont know how to solve this.
               Any help is greatly appreciated.
    Thanks in advance.
    Regards,
    Fred.

    Hi Murali,
    I saw the solutions you provide seems to work for the user.
    What I want to do is to transfer the Hierarchy from 0GL_ACCOUNT to another InfoObject 0GLACCEXT, however, when I right clicked the Hierarchy and tried to create transfer rules, but the Transfer Rules option prompted only DataSource in Source selections, I cannot select 0GL_ACCOUNT_HIER as my source.
    Any advice?
    Many thanks,
    Vince

  • Excel data source and the use of add command

    HI, Looking for suggestions on how to work with multiple inputs that cannot be joined directly.  Here's the background.
    The Report currently reads in two different Ecel files and uses 3 SQL commands to query an Oracle Database.  I need to join the 5 data sources and am having issues with the 2 excel files.  In one file I need to be able to derive a field based on another column in the file In order to create the join condition to the SQL commands.  I'd equate this to a case statement in SQL, but how goes one do that using the 'add command' feature?  What is the syntax?
    Next I would need to join (left outer) the two excel files using two fields from file A (a1, a2) and 3 fields from file B (b1,b2,b3), where a1=b1 and b2 <= a2  <= b3 when rows from A exist in B.  If row A does not exist in B then we still want it in the report and available to left outer join to the 3 oractab data sources.
    runtime is also a concern.
    Any Suggestions?

    hi Elena,
    in this case the use of subreports is not recommended. that's because you're exporting to excel and you need data in columns across the report. subreports will not, unfortunately, give you what you need.
    this would bring you back to joining the datasources. what i would recommend is looking into using 'oracle database link' to link your oracle db to excel files. here's one article as an example but you may be able to find a better one. if you have questions on this please ask them on an oracle forum as the syntax that you need will be database specific.
    a lot of databases have this type of technology which allows you to create a view to other data. sql server has 'linked servers', sap hana has 'smart data access'. essentially you are creating a non-materialized view to the external data. then this view is available on the main oracle server where you established this connection. this should be a lot easier than trying to bring a bunch of command objects together off independent datasources inside of crystal.
    -jamie

  • Problem with outer join with filter on join column

    Hi,
    In physical layer I have one dimension and two facts, and there's an outer join between the facts.
    dim_DATE ,
    fact_1 ,
    fact_2
    Joins:
    dim_DATE inner join fact_1 on dim_DATE.DATE = fact_1.DATE
    fact_1 left outer join fact_2 on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
    When I run a report with a date as a filter, OBIEE executes "optimized" physical SQL:
    select fact1.X, fact2.Y
    from
    Fact_1 left outer join on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
    where Fact_1.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD' )
    and  Fact_2.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD')
    The filter on Fact_2.DATE effectively replaces outer join with inner.
    Is there a way to disable this "optimization", which is actually very good for inner joins, but doesn't allow outer joins?
    Thanks in advance,
    Alex
    Edited by: AM_1 on Aug 11, 2009 8:20 AM

    If you want to perform a Fact-based partitioning with OBIEE (two fact with the same dimension), you have to :
    * create in your physical layer for each fact table the joins with the dimension
    * create in the Business Model layer ONE star schema with ONE logical fact table containing the columns of your two physical fact table
    In this way when you choose minimal one column of your fact1 and one column of your fact2, OBIEE will perform two query against each fact table/dimension, join them with an OUTER JOIN and your problem will disappear.
    Cheers
    Nico

  • Help to read a table with data source and convert time stamp

    Hi Gurus,
      I have a req and need to write a ABAP prog. As soon as i excute ABAP program it should ask me enter a data source name, then my ABAP prog has excute teh code, in ABAP code i have to read a table with this data source as key, sort time stamp from table and should display the data source and time stamp as output.
    As follows:
    Enter Data Source Name: 
    Then user enters : 2lis_11_vahdr
    Then out put should be "Data source  :"  10-15-2008.
    The time stamp format in table is 20,050,126,031,520 (YYYYMMDDhhmmss). I have to display as 05-26-2005. Any help would be apprciated.
    Thanks,
    Ram

    Hi Jayanthi Babu Peruri,
    I tried to extract YEAR, MONTH, DAY separately and using
    EDIT MASK written it.
    Definitely there will be some STANDARD CONVERSION ROUTINE will be there. But no idea about it.
    DATA : V_TS      TYPE TIMESTAMP,
           V_TS_T    TYPE CHAR16,
           V_YYYY    TYPE CHAR04,
           V_MM      TYPE CHAR02,
           V_DD      TYPE CHAR02.
    START-OF-SELECTION.
      GET TIME STAMP FIELD V_TS.
      V_TS_T = V_TS.
      CONDENSE V_TS_T.
      V_YYYY = V_TS_T.
      V_MM   = V_TS_T+4(2).
      V_DD   = V_TS_T+6(2).
      V_TS_T(2) = V_MM.
      V_TS_T+2(2) = V_DD.
      V_TS_T+4(4) = V_YYYY.
      SKIP 10.
      WRITE : /10 V_TS," USING EDIT MASK '____-__-________'.
              /10 V_YYYY,
              /10 V_MM,
              /10 V_DD,
              /10 V_TS_T USING EDIT MASK '__-__-__________'.
    If you want DATE alone, just declare the length of V_TS_T as 10.
    Regards,
    R.Nagarajan.
    We can -

  • Values displayed in report do not match those in underlying data source

    hi -- I have a report based on a view. The view contains a date (never null) and several numeric value columns
    which can be null. The dates are outer joined to a date table, so even in Feb of 2011, the view will
    have a month date for every month of the year, but the other columns are null values for Feb - Dec.
    January does have values.
    So,  the view data (queried from sqlplus) is correct. However, when that view is queried via a Crystal report, all
    data except the date is null -- even for complete years where there's a value for every month.
    When I modify the view to replace nulls with 0s, all values (even the ones that are not null / not 0 when querying the view)
    are now displayed as 0.
    The dates are correct, and the database fields in question are in a details section; I can't figure out what's going on.
    Ideas?
    Thanks,
    Carol

    hi Brian -- First, I did try the other suggestion Convert Database Null Values to Default, and that didn't work.
    Here's the info you requested:
    Crystal Reports version: 12.3.3.812, product type Full
      (I'm pretty sure this whole thing was working a couple of months back; I thought
       maybe I was remembering incorrectly when it started behaving the way it is now.
       I can't recall for sure, but it's possible that my upgrade to SP3 (is that the
       latest one?) and the hotfixes were applied betweeen then and now...I just thought
       of that as I was writing up this response.
    Oracle database: same results on 9.2.0.8 and 10.2.0.4
    Connection type: I'm not (I don't think) using ODBC.
      My connection type for both databases is Crystal's Oracle Server.
    The results in SQLPlus for both queries (the one that returns all
    0s and the one that returns all nulls in Crystal) are correct. That is, there
    are values where there are supposed to be values, nulls/0s where
    there are no values.
    I'm sure the problem is with the outer join to the date table. Here's
    (part of) the sql for the view definition. Dates_between is a function
    that returns a full list of sequential dates from the indicated start date
    to the indicated end date, at the interval specified.
    select *
    from
    (select
    rep.report_name
    REPORT_NAME,
    to_char(start_date_time, 'yyyy')
    YEAR,
    start_date_time
    START_DATE_TIME,
    round(sum(decode(site_datatype_id, 45110, nvl(value, 0), 0)), 2)
    COCHITI_ELEV,
        FROM r_month,
          ref_wa_report rep,
          TABLE(dates_between('01-JAN-2005',TRUNC(sysdate,'yyyy')+366,'month')) dates
        WHERE rep.report_id = 45
        AND date_time       = start_date_time(+)
        GROUP BY rep.report_name,
          dates.date_time
        ORDER BY rep.report_name,
          dates.date_time
    When I don't use the date table, and the WHERE clause is as follows, the report
    returns the correct data (that is, it actually returns the data that's in the DB).
    The problem is that it doesn't return any rows if there isn't any data -- and I need
    rows with dates only in that case:
    from r_month, ref_wa_report rep
    where rep.report_id = 45
    group by rep.report_name, start_date_time
    order by rep.report_name, start_date_time
    The SQL query in Crystal was the same for all 3 different views:
    SELECT "WA_45_SEDIMENT_STOR_SJC_VIEW"."START_DATE_TIME", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_ELEV", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_RG_CONT",
    "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_SJC_CONT", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_MONTH_SED", "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_ACCUM_SED",
    "WA_45_SEDIMENT_STOR_SJC_VIEW"."COCHITI_CONT", "WA_45_SEDIMENT_STOR_SJC_VIEW"."YEAR", UPPER(RTRIM("WA_45_SEDIMENT_STOR_SJC_VIEW"."REPORT_NAME"))
    FROM   "ALBHDBA"."WA_45_SEDIMENT_STOR_SJC_VIEW" "WA_45_SEDIMENT_STOR_SJC_VIEW"
    ORDER BY "WA_45_SEDIMENT_STOR_SJC_VIEW"."START_DATE_TIME"
    I'm including the definition of dates_between below. Sorry, this is a ton of info, but might as well
    include it all now!
    create or replace
    FUNCTION dates_between(start_date_time IN DATE,
                                             end_date_time IN DATE DEFAULT NULL,
                                             interval VARCHAR2 DEFAULT 'day')
    RETURN date_array
    PIPELINED
    end_date DATE := end_date_time;
    start_date DATE := start_date_time;
    dates date_object := date_object(NULL);
    temp_chars VARCHAR2(30);
    BEGIN
      IF end_date < start_date THEN
        deny_action('End date must be after start date!');
      END IF;
      BEGIN
        SELECT interval_name
        INTO temp_chars
        FROM hdb_interval
        WHERE interval_name = interval;
      EXCEPTION WHEN others THEN
        deny_action('Dates between function INVALID ' || interval || ' interval');
      END;
      CASE interval
      WHEN 'instant' THEN
        deny_action('Cannot use instant interval in dates_between! Use instants_between.');
      WHEN 'hour' THEN
        IF end_date IS NULL THEN
          end_date := TRUNC(sysdate,   'HH24') + 1 / 24;
        END IF;
        FOR i IN 0 ..(end_date -start_date) *24
        LOOP
          dates.date_time := start_date_time + i / 24;
          pipe ROW(dates);
        END LOOP;
      WHEN 'day' THEN
        IF end_date IS NULL THEN
          end_date := TRUNC(sysdate,   'DD') + 1;
        END IF;
        FOR i IN 0 ..(end_date -start_date)
        LOOP
          dates.date_time := start_date_time + i;
          pipe ROW(dates);
        END LOOP;
      WHEN 'month' THEN
        IF end_date IS NULL THEN
          end_date := TRUNC(sysdate,   'MM');
        END IF;
        /* months_between takes the later date first */
        FOR i IN 0 .. months_between(end_date,   start_date)
        LOOP
          dates.date_time := add_months(start_date,   i);
          pipe ROW(dates);
        END LOOP;
      WHEN 'year' THEN
        IF end_date IS NULL THEN
          end_date := TRUNC(sysdate,   'YYYY');
        END IF;
        /* months_between takes the later date first */
        FOR i IN 0 .. months_between(end_date,   start_date) / 12
        LOOP
          dates.date_time := add_months(start_date,   i *12);
          pipe ROW(dates);
        END LOOP;
      WHEN 'wy' THEN
        IF end_date IS NULL THEN
          end_date := add_months(TRUNC(sysdate,   'YYYY'),   -3);
        END IF;
        /* months_between takes the later date first */
        FOR i IN 0 .. months_between(end_date,   start_date) / 12
        LOOP
          dates.date_time := add_months(start_date,   i *12);
          pipe ROW(dates);
        END LOOP;
      END CASE;
      RETURN;
    END dates_between;

  • Data Source for DAR01 field in HR.

    Hi Guys,
    I have the following fields in HR area PA. First three fields are for D.O.J. group and last field is for Date type from table PA0041. I didn't find any info object and data source for these fields in BI. Can any one help me out for finding standard data source. 
    1. DAR01
    2. DAR02
    3. DAR03
    4. DAT01
    Thanks
    Chintu

    Hi,
    Check the table RSOSFIELDMAPSH in the BW side, this should be helpful for you.
    Thanks,
    Arminder

  • Problem with embedded data-sources.xml and custom UserManager

    Hi all,
    Our application uses a custom UserManager, which is basically extended from the JDBC UserManager, declared as follows in orion-application.xml:
         <user-manager class="com.infocorpnow.a2g.security.oracle.A2GUserManager">
              <property name="table" value="pos.users" />
              <property name="userNameField" value="username" />
              <property name="passwordFiled" value="password" />
              <property name="dataSource" value="jdbc/A2GDS" />
              <property name="groupMemberShipTableName" value="pos.user_roles" />
              <property name="groupMemberShipGroupFieldName" value="role_name" />
              <property name="groupMemberShipUserNameFieldName" value="login_id" />
         </user-manager>
    Since we want to be able to deploy the application several times on the application server, and therefore have each deployment of the ear point to its own datasource (i.e. its own local "A2GDS"), we've found out how to embed data-sources.xml inside the EAR file we're deploying, and modify the orion-application.xml as follows:
         <data-sources path="./data-sources.xml" />
    And then place data-sources.xml in the same meta-inf folder as the orion-application.xml.
    This has worked fine when deploying to the standalone OC4J.
    Now when I try to deploy the exact same EAR file in Oracle 9iAS, and I get to the User Manager screen, the Custom User Manager does not show up correctly. It did show up prior to me embedding the data-sources.xml. Please help? This is fairly urgent.
    Thanks
    Jason

    I should also mention I'm using the Java Edition of 9iAS R2 (9.0.3 container) on Solaris.

Maybe you are looking for

  • Help! Total newbie question...

    I want to make a flash form where the viewer/user can watch a video clip of their choice (from a drop-down control or something else if there's a better way). I've found myself totally unable to find our how to do this.  I mean, frankly, I don't even

  • Working with local SQL databases in AIR

    This question was posted in response to the following article: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118676a5497-7fb4.html

  • ICal: show all recurring events

    I have a bunch of recurring events throughout the year in iCal, and I'd like to see  a list of them.  Or at least, find them one by one, to see what's there (and what isn't).  Is there some way I can doa  search that shows m a list of just the recurr

  • Adobe Genuine Software Verification Failure

    I bought and downloaded Photoshop Elements 13 ad Premiere Elements 13 upgrade. When installing Premiere I get "Installation Failed; Adobe Genuine Software Verification Failure" I entered the serial number sent to me in the purchase.

  • MacBook Internal Speakers - Which side seems to be louder?

    For me, the right side internal speaker (where arrow keys are) seems to be louder than the left side speaker (where caps lock key is). Does anyone know where exactly those internal speakers are? I put my ear on each side and I felt that the left spea