Import Data Table from Different DB Schema in BI Administration

Here is my scenario:
Tables are imported from different DB schema in Administration. They are then joined together.
When I select fields from more than one schema in BI Answer, incorrect result is returned.
Below is the SQL it returns:
-------------------- Sending query to database named DW_TESTING (id: <<15875>>):
select D1.c4 as c1,
D1.c5 as c2,
D1.c2 as c3,
D1.c1 as c4,
D1.c3 as c5
from
*(select D1.c1 as c1,*
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
D1.c5 as c5
from
*(select sum(T34.PRODUCT_SALES) as c1,*
T52.DESCRIPTION as c2,
T52.BE_TYPE as c3,
T137.YEAR as c4,
T137.QUARTER as c5,
ROW_NUMBER() OVER (PARTITION BY T52.BE_TYPE, T137.QUARTER ORDER BY T52.BE_TYPE ASC, T137.QUARTER ASC) as c6
from
BEADMIN.BE_MASTER T52,
DWADMIN.DATE_MASTER T137,
BEADMIN.BE_DAILY_SALES T34
where  ( T34.BE_TYPE = T52.BE_TYPE and T34.SALES_DATE = T137.CALENDAR_DATE )
group by T52.BE_TYPE, T52.DESCRIPTION, T137.YEAR, T137.QUARTER
*) D1*
where  ( D1.c6 = 1 )
*) D1*
order by c2
+++Administrator:7e0000:7e001f:----2009/06/08 17:22:09
-------------------- Sending query to database named DW_TESTING (id: <<15938>>):
select D2.c2 as c1,
D2.c3 as c2,
D2.c1 as c3
from
*(select D1.c1 as c1,*
D1.c2 as c2,
D1.c3 as c3
from
*(select sum(T109.PRODUCT_SALES) as c1,*
T137.YEAR as c2,
T137.QUARTER as c3,
ROW_NUMBER() OVER (PARTITION BY T137.QUARTER ORDER BY T137.QUARTER ASC) as c4
from
DWADMIN.DATE_MASTER T137,
DWADMIN.DAILY_SALES T109
where  ( T109.SALES_DATE = T137.CALENDAR_DATE )
group by T137.YEAR, T137.QUARTER
*) D1*
where  ( D1.c4 = 1 )
*) D2*
order by c2
It seems that query has been seperated into two, and doesn't have relationship between each others.
However, I also tested the same situation in other environment, and it returns correct result. I found that the query hasn't been seperated into two, but one. The query is as below:
-------------------- Sending query to database named BI (id: <<2392>>):
WITH
SAWITH0 AS (select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4
from
*(select sum(T29.PRODUCT_SALES) as c1,*
T96.DESCRIPTION as c2,
T120.YEAR as c3,
T120.QUARTER as c4,
ROW_NUMBER() OVER (PARTITION BY T96.DESCRIPTION, T120.QUARTER ORDER BY T96.DESCRIPTION ASC, T120.QUARTER ASC) as c5
from
SIMULATION.BE_MASTER T96,
SIMULATION.DATE_MASTER T120,
BIEE.BE_DAILY_SALES T29
where  ( T29.BE_TYPE = T96.BE_TYPE and T29.SALES_DATE = T120.CALENDAR_DATE )
group by T96.DESCRIPTION, T120.YEAR, T120.QUARTER
*) D1*
where  ( D1.c5 = 1 ) ),
SAWITH1 AS (select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3
from
*(select sum(T102.PRODUCT_SALES) as c1,*
T120.YEAR as c2,
T120.QUARTER as c3,
ROW_NUMBER() OVER (PARTITION BY T120.QUARTER ORDER BY T120.QUARTER ASC) as c4
from
SIMULATION.DATE_MASTER T120,
SIMULATION.DAILY_SALES T102
where  ( T102.SALES_DATE = T120.CALENDAR_DATE )
group by T120.YEAR, T120.QUARTER
*) D1*
where  ( D1.c4 = 1 ) )
select distinct case  when SAWITH0.c3 is not null then SAWITH0.c3 when SAWITH1.c2 is not null then SAWITH1.c2 end  as c1,
case  when SAWITH0.c4 is not null then SAWITH0.c4 when SAWITH1.c3 is not null then SAWITH1.c3 end  as c2,
SAWITH0.c2 as c3,
SAWITH1.c1 as c4,
SAWITH0.c1 as c5
from
SAWITH0 full outer join SAWITH1 On nvl(SAWITH0.c4 , 8) = nvl(SAWITH1.c3 , 8) and nvl(SAWITH0.c4 , 9) = nvl(SAWITH1.c3 , 9)
order by c1, c2, c3
This query returns correct result and seems reasonable.
Assume that the setup in BI Administration is the same for both environment, why the first situation returns query that are separated?

I have made the same remark but not with two different environment and same design.
What can influence the construction of two queries ?
Here some ideas :
- if you have of course two connections pools (I assume not)
- if in our database features (double click on the icon and choose the tab feature), full outer join is not supported
But I have this two requirement on my laptop and I can see that I have also two sql fired.
What you can do is to make a comparison of your two repository.
In the administration tool, File/Compare.
The result will be very interesting.

Similar Messages

  • How do you join two tables from different Oracle schemas using a subquery

    I am trying to join two tables from different Oracle schemas using a subquery. I can extract data from each of the tables without a problem. However, when I combine the select statements using a subquery I get the Oracle error *'ORA-00936: missing expression'*. Since each SELECT statement executes on its own without error I don't understand what is missing. The result set I am trying to get is to match up the LINE_ID from PDTABLE_12_1 in schema DD_12809 with the MAT_DESCRIPTION from table PDTABLE_201 in schema RA_12809.
    The query is as follows:
    sql = "SELECT [DD_12809].[PDTABLE_12_1].LINE_ID FROM [DD_12809].[PDTABLE_12_1] JOIN " _
    + "(SELECT [RA_12809].[PDTABLE_201].MAT_DESCRIPTION " _
    + "FROM [RA_12809].[PDTABLE_201]) AS FAB " _
    + "ON [DD_12809].[PDTABLE_12_1].PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS"
    The format of the query is copied from a SQL programming manual.
    I also tried executing the query using a straight JOIN on the two tables but got the same results. Any insight would be helpful. Thanks!
    Edited by: user11338343 on Oct 19, 2009 6:55 AM

    I believe you are receiving the error because you are trying to JOIN on a column that doesn't exist. For example you are trying to join on FAB.PIPING_MATER_CLASS but that column does not exist in the subquery.
    If you want to do a straight join without a subquery you could do the following
    SELECT  DD_12809.PDTABLE_12_1.LINE_ID
    ,       FAB.MAT_DESCRIPTION
    FROM    DD_12809.PDTABLE_12_1
    JOIN    RA_12809.PDTABLE_201    AS FAB ON DD_12809.PDTABLE_12_1.PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS  HTH!

  • How to export and import dependent tables from 2 different schema

    I have a setup where schema1 has table 1 and schema 2 has table2. And table 1 from schema1 depends upon table 2 from schema 2.
    I would like to export and import these tables only and not any other tables from these 2 schemas with all information like grants,constraints.
    Also will there be same method for Oracle 10g R1,R2 and Oracle 11G.
    http://download.oracle.com/docs/cd/B12037_01/server.101/b10825/dp_export.htm#i1007514
    Looking at this For table mode it says
    Also, as in schema exports, cross-schema references are not exported
    Not sure what this means.
    As I am interested in only 2 tables I think I need to use table mode. But if I try to run export with both tables names, it says table mode support only one schema at a time. Not sure then How would the constraints would get exported in that case.
    -Rohit

    worked for my 1st time I tried
    exp file=table2.dmp tables="dbadmin.temp1,scott.emp"
    Export: Release 10.2.0.1.0 - Production on Mon Mar 1 16:32:07 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses WE8ISO8859P1 character set (possible charset conversion)
    About to export specified tables via Conventional Path ...
    Current user changed to DBADMIN
    . . exporting table                          TEMP1         10 rows exported
    EXP-00091: Exporting questionable statistics.
    Current user changed to SCOTT
    . . exporting table                            EMP         14 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    Export terminated successfully with warnings.

  • Accessing tables from different schema in CDS and AMDP

    Hi All,
    We are working on a HANA system which has several schema replicated from SAP R/3/Non SAP systems. We have BW 7.4 SP9 deployed on the same system and accessing the HANA views using latest BW virtual objects such as Open ODS , Composite providers etc.
    We are also using the BW system for few ABAP based data processing developments. We are currently accessing HANA views in ABAP programs by creating dictionary views based on external HANA views.
    We would like to however use recent possibilities of CDS and AMDP for better life cycle management of ABAP based solutions. The open SAP course on this subject was of very good help. Thanks a lot "open SAP team" for that. I would however have few open questions,
    As I understand AMDP gives us full flexibility of writing sql procedures within ABAP development environment, but can we access tables from different schema into AMDP code. If yes, then sample code would help.
    If the answer of first question is yes, then how do we manage transports between development and production systems where the schema names would be different. Currently in open HANA developments, such transport is manged using Schema mapping.
    Can I also use different schema tables in CDS views.
    We are updating few tables in ABAP dictionary after applying processing logic in ABAP program as detailed in step 1. With the new approach using AMDP, can we directly update database schema tables which will give us an optimization advantage.
    New ABAP HANA program interfaces are quite promising and we would like to use them to optimize many data intensive applications.
    Thanks & Regards,
    Anil

    Hi Anil,
    I can only answer 1. and 2. (and would be interested into 3. as well):
    1.
    Yes you can access tables from a different schema and also HANA views. In this case no 'using' is needed.
    Examples:
        RESULT = SELECT
        FROM
              "SAP_ECC"."T441V" AS t,
              "_SYS_BIC"."tmp.package/AFPO" AS a.
        WHERE ...
    2. In this case, if you need schema mapping: You could use HANA (projection) views which just forward to a different schema, also see example.
    Best regards,
    Christoph

  • Analytic View with tables from different schema

    Hi,
    I'm curious if I make something wrong or if this is not possible:
    I want to use two tables each in a different schema. I can drop them into the DataFoundation, can connect them, assign them some measure. But activation fails due to insufficient privileges. When I use the tables from the same schema activation works well. With the insufficient privileges I would guess HANA cannot create a View (failed with the statement CREATE COLUMN_VIEW "_SYS_BIC"."USER/ANALYTIC_VIEW_NAME"....).
    Since I tried the same assignment with the System-User and failed I wonder what kind of permissions are required. Or is this generally not allowed (resp. prohibited)?
    If not allowed, could somebody give me a hint, why its not possible?
    If it is possible, what kind of rights are required to get it working?
    roland

    Hm', I have allowed SYS_REPO the rights to the table and was able to activate the view. But now I have the problem, that the DataPreview is not working (again insufficient privileges). What user has to have additional permissions for the JDBC-query?
    Do I have to take care more on the privileges for other things?

  • No Easy Way to Join on Tables from Different Schemas

    Hi,
    The company policy does not allow to join on tables from different schemas or use db links...
    I'm tasked to come up with a Perl script that does exactly that - allows for the SELECT statement to do several joins on 3 different schemas. In addition 1 of the schemas is on the different host altogether.
    Upping the privileges for my user and allowing db links is not an option...Can someone, please help me to understand on a conceptual level how would I use Perl and what logic would it have and what would it (perl) do?
    Thank you,

    Court in the wrong job... ;)
    It's like a librarian who is a hard rock artist maintaining the silence in the premises. ;)
    My dear friend, i don't think this is the right place for your requirement. This is the PL/SQL forum. If you have any problem related PL/SQL or SQL you can place that here.
    Regards.
    Satyaki De.

  • Importing only tables from full export

    hi,
    our database is going to get live..
    Oracle 10GR2
    Windows 2003.
    i have full expdp dump file...
    i just want to import only tables from that dumpfile..
    how can i do that..
    there are around 1059 tables...
    searched over the net but did not find anythiing..
    your help is needed....
    thank you ..
    wating for your

    thnks for the replay..
    the schema is different in which the tables needs to be imported.
    but this schema in which tables needs to b imported contains the same number of tables with same strutures.
    thanks.

  • How to import a table from another oracle database ?

    Hi all ,
    i could like to use pl/sql to import one table from another oracle database server ?
    is it possible to do this ?
    A server B server
    table: test <------------------------> table : newtest
    the tns profile already configurated . the connection is ready .
    thanks a lot !
    Best Regards,
    Carlos

    if i don't have TEST table on server B whether COPY command will create this table on server B with the same structure ? If you specify CREATE as a clause the table will be created:
    SQL> help copy
    COPY
    COPY copies data from a query to a table in a local or remote
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                APPENDCREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[password]@connect_identifier

  • Error in importing the tables from database

    HI ,
    while importing the table from the metada by using OCI call 10g/11g i am getting the below exception:
    *"Some objects are not imported because of invalid names : (DESCRIPTION =(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))"*
    i am getting this exception after selecting the objects which i want to import from the database.....it first imports the tables and the throws the above exception and then removies from the repository view.
    How can i get this resolved???

    Hi,
    I'm also hitting this problem, did anyone solve this, I'm not able to import any data to the repository, error message is: -
    *"Some objects are not imported because of invalid names"*
    Thanks,
    Mike

  • How to import a table from another database using DB toolset.

    Hello All
    I would like to import a table from one database to another using DB toolbox.
    I do not want to import all data to LV and then save them to another database. Instead I would prefer to use SQL syntax.
    Does anobody know how to write SQL command to import whole table from one database to another?
    I have found in some SQL manual that INSERT INTO should work, but JET4 returns an error that table (e.g. c:\mydatabase\table1) can not be found.
    Thanks in advance
    Pawel

    if i don't have TEST table on server B whether COPY command will create this table on server B with the same structure ? If you specify CREATE as a clause the table will be created:
    SQL> help copy
    COPY
    COPY copies data from a query to a table in a local or remote
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                APPENDCREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[password]@connect_identifier

  • How do i import a table from excel into dw8?

    I want to import a table from excel into a table in dw8, i
    just want the data inside the excel table to be imported to the
    table in dw8.
    The tables has the same stracture - number of rows and
    columns.
    is it possible?
    btw special paste is no good, since it copies the stracture
    of the table from excel which contains <td height="17">,
    which is not good coding - td doesn't support the height
    option.

    table without special paste:
    <table width="90%" border="1">
    <tr>
    <th scope="col"> </th>
    <th scope="col"> </th>
    <th scope="col"> </th>
    <th scope="col"> </th>
    <th scope="col"> </th>
    <th scope="col"> </th>
    <th scope="col"> </th>
    <th scope="col"> </th>
    <th scope="col"> </th>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    </table>
    table with special paste(Text with structure):
    <table width="90%" border="1">
    <tr height="17">
    <td height="17" dir="rtl"
    align="right"> </td>
    <td dir="rtl" align="right"> </td>
    <td dir="rtl" align="right"> </td>
    <td dir="rtl" align="right"> </td>
    <td dir="rtl" align="right"> </td>
    <td dir="rtl" align="right"> </td>
    <td dir="rtl" align="right"> </td>
    <td dir="rtl" align="right"> </td>
    <td> </td>
    </tr>
    <tr height="17">
    <td height="17" align="right"> </td>
    <td align="right"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr height="17">
    <td height="17" align="right"> </td>
    <td align="right"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr height="17">
    <td height="17" align="right"> </td>
    <td align="right"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr height="17">
    <td height="17" align="right"> </td>
    <td align="right"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr height="17">
    <td height="17" align="right"> </td>
    <td align="right"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr height="18">
    <td height="18" align="right"> </td>
    <td align="right"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    </table>

  • Error importing a table from DB2 in OBI 10g

    Hello,
    I am trying to import a table from DB2, but I have the following issue:
    *[nQSError: 16001] ODBC error state: S1000 code: 29986 message: [IBM][Controlador ODBC de iSeries Access][DB2 UDB]SQL0901 - Error del sistema SQL..*
    Steps I have done are:
    1) Create System DSN
    Driver: iSeries Access ODBC Driver
    2) Create a new database
    Database souce definition = Database DB2/AS400
    3) Create a new connection pool -->
    Call interface: DB2 CLI (Unicode)
    Datasource name: System name (specified in the System DSN)
    I have tested with System DSN name too
    Username: username DB
    Password: pwd DB
    c) Import table: File --> Import --> from Database
    Connection Type = ODBC 3.5 and I select the System DSN created
    I am working with OBI 10g (10.1.3.2.1) in Windows Server 2003 Enterprise and the DB2 is OS400 V5R4.
    Thank you and regards,
    Mónica.

    Hi,
    I have installed the DB2 client and from Access with the same ODBC is possible to import tables, but I don't understand why I can't do this operation from Administration Tool.
    Do you know how can I test the ODBC? Or if it is possible to see the error with more details (any log file)? I have tested a lot of things, but I can't solve the issue.
    The PATH system variable is right:
    D:\oracle\bise1\bi\server\Bin;D:\oracle\bise1\bi\web\bin;D:\oracle\bise1\bi\web\catalogmanager;D:\oracle\bise1\bi\SQLAnywhere;D:\oracle\bise1\jdk\bin;D:\oracle\bise1\db\bin;D:\oracle\bise1\owb\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\TOOLS;C:\PROGRA~1\IBM\CLIENT~1\Shared;C:\PROGRA~1\IBM\CLIENT~1;C:\PROGRA~1\IBM\CLIENT~1\Emulator;
    And in the path that it is mentioned in the error I can find the dll.
    Are being doing any wrong step to import a table?
    Thank you and regards,
    Mónica.

  • Importing a table from Microsoft Word

    I'm importing a table from Microsoft Word but the formatting isn't importing. For example, most of the grid lines are missing.
    Help!

    Hello,
    we don't want to be so awkward please have a look here:
    http://help.adobe.com/en_US/indesign/cs/using/WSa285fff53dea4f8617383751001ea8cb3f-6ff5a.h tml#WSa285fff53dea4f8617383751001ea8cb3f-6ff2a and see "Importing tables from other applications".
    Good luck!
    Hans-Günter

  • Import a table from FULLDB dump

    Oracle 8i / Windows2000 server.
    When i tried to import a table from a fulldb dump in a cloned databse.
    i tried to drop the same name table from user.
    NO authority to drop the table error
    when i tried to rename the table
    NO authority to rename the table error.
    How to import a table from fulldb dump in the cloned databse.?
    [email protected]

    Hi..
    Can you post the ORA error that you are getting....
    Anand

  • How to join tables from different databases (DBLink/DB connection )

    Hello,
    i have an issue and i hope you could help me to solve it. My problem is: I want to create native sql select which joins two tables from different DB (both of them are ORACLE, one of them internal, another one - external). I have found several notes and posts, but without any success. Db connection exists in dbcon table, so this part of my problem has been solved.
    I would like something like that:
    select * from table1@xxx inner join table2.
    i can not split this select into two separate ones, because both tables store over 30 mln. entries and i do not want to create any copies of them.
    Br,
    dez

    Hi,
    you might need to create a DB-Link on DB level and use EXEC SQL.
    Lots of stuff on google about this, like
    Oracle DBLink ( external database )
    Volker

Maybe you are looking for

  • Report Painter - Library - Error in Transport

    Hi Dear experts, I have three reports built with report painter in the development system and these are associated with a z library. When we transported the objects, the Tcodes associated with these reports have been transportd properly. but the repo

  • Problem rasterizing EPS files...dimensions reduced

    I have some Illustrator files (17" x 16") that I need to convert to 1-bit TIFF files at 2400 dpi. Illustrator apparently can't export them at that resolution, so I saved them as EPS and opened them in Photoshop. The file dimensions appeared correct i

  • Why can't I emptyTrash?   I get an Error code 8003

    I can't empty Trash.   I'm getting an error code 8003.   Can anyone solve my problem?

  • HT204053 documents in icloud.

    how do I pick from my mac book pro which documents I want to sync to icloud?

  • Bent Unibody MacBook Pro

    So we've got a Unibody MacBook pro that fell off a bed and the case is bent in the lower right hand corner (not the lid). The computer still functions perfectly but it can't be closed. The local apple authorized store quoted us $1000 to do the repair