Linking Table Between Database

How can I link my table to 1 view in other database?
I know, we can estalish the connection but I don't know how to do that.
Please help,
Thank You,

What do you mean "link"? You can create a database link
CREATE [PUBLIC] DATABASE LINK database_link_name
  CONNECT TO username_on_remote_machine
  IDENTIFIED BY password_on_remote_machine
  USING 'tns_alias_to_remote_database'and query tables across the database link. You cannot, however, define foreign key constraints across instances, which is a good thing considering the performance implications of doing so.
Justin

Similar Messages

  • Link Table between CRM and ERP

    Hi Experts,
    Does anyone knows the link table between CRM and ERP for Contact Person (Buss Part) CRM and Contact Person ERP.
    In my customer system, contacts are automatically duplicated in CRM.
    When you make a change in ERP, this change is automatically done in CRM.
    So I suppose that there is a table between the both systems to find the corresponding number...
    Thank you for your help and hope my English is good enough to understand :o)
    Best regards,
    Luis.

    Hi Micky,
    Thanks for your answer.
    Unfortunatelly, number are differents...
    I move this question to CRM forum ;o)
    Kr,
    Luis.
    This has been solved in this thread:
    Link Table between CRM and ERP
    Edited by: Luis Loredo Marino on Feb 24, 2010 1:24 PM

  • Linking Table between AR to GL

    Hi Everyone,
    I have transferred all my AR Invoices to GL. Now I want to trace which AR Invoice is linked with which GL entry. Can anyone pl help me by giving the linking tables ??
    Thanx in advance.
    Regards,

    Hi Kiran,
    I executed the below query :
    select gjjlv.period_name "Period Name"
    , gjb.name "Batch Name"
    , gjjlv.header_name "Journal Entry For"
    , gjjlv.je_source "Source"
    ,glcc.concatenated_segments "Accounts"
    , NVL(gjjlv.line_entered_dr,0) "Entered Debit"
    , NVL(gjjlv.line_entered_cr,0) "Entered Credit"
    , NVL(gjjlv.line_accounted_dr,0) "Accounted Debit"
    , NVL(gjjlv.line_accounted_cr,0) "Accounted Credit"
    , gjjlv.currency_code "Currency"
    , rctype.name "Trx type"
    , rcta.trx_number "Trx Number"
    , rcta.trx_date "Trx Date"
    , RA.CUSTOMER_NAME "Trx Reference"
    , gjh.STATUS "Posting Status"
    , trunc(gjh.DATE_CREATED) "GL Transfer Dt"
    , gjjlv.created_by "Transfer By"
    from apps.GL_JE_JOURNAL_LINES_V gjjlv
    , gl_je_lines gje
    , gl_je_headers gjh
    , gl_je_batches gjb
    , ra_customer_trx_all rcta
    , apps.ra_customers ra
    , apps.gl_code_combinations_kfv glcc
    , ra_cust_trx_types_all rctype
    where /*gjh.period_name IN ('OCT-2008','NOV-2008')
    and */glcc.code_combination_id = gje.code_combination_id
    and gjh.je_batch_id = gjb.je_batch_id
    and gjh.je_header_id = gje.je_header_id
    and gjh.period_name = gjb.default_period_name
    and gjh.period_name = gje.period_name
    and gjjlv.period_name = gjh.period_name
    and gjjlv.je_batch_id = gjh.je_batch_id
    and gjjlv.je_header_id = gjh.je_header_id
    and gjjlv.line_je_line_num = gje.je_line_num
    and gjjlv.line_code_combination_id = glcc.code_combination_id
    and gjjlv.line_reference_4 = rcta.trx_number
    and rcta.cust_trx_type_id = rctype.cust_trx_type_id
    and rcta.org_id = rctype.org_id
    and ra.customer_id = rcta.bill_to_customer_id
    I also saw that there is no data vailable in view GL_JE_JOURNAL_LINES_V, however I have made number of transfers from AR to GL and posted it.

  • Link table between AP Invoice and AP Downpayment Invoice

    Hi,
    I want to get the link between the table OPCH and ODPO,
    so that I can monitor the cash advances,
    Thank you very much,
    Regards,
    Clint

    Hi Gordon,
    I have tried that already, if we follow the process, First we enter the Downpayment from AP Down module, after that we go to the AP Invoice and we click the button Total Down Payment to call the amount from Downpayment, we cant see the Base Entry and Target entry since both have different module but we can see they must have be a connection since Ap Invoice can call the payment from Downpayment and there must be a connection between them but I cant see how.
    Thank you very much.
    Clint

  • Linking tables between Pages and Numbers

    I would like to link a table in Numbers to Pages so that the table can auto update in Pages when it is changed in Numbers. Anyone know if this is possible?
    thanks!

    This is not possible at the present time.
    Regards,

  • Transfering tables between databases

    I have some tables in an Oracle database that I have to copy (for tests) to another Oracle database resident on another computer without compromising the first database in any way.
    How can I do this? Is there a friendly (and straightforward process) ?

    Hi,
    Apart from the three methods what Mr.Lijesh Kalavara has stated, i feel COPY command can be another option.
    It copies data from a query to a table in a local or remote database location.
    Set arraysize and set copycommit controls the transactions commit batch mechanism.
    sql> SET ARRAYSIZE <Number Of Records in each batch>
    set arraysize 1000 determine the 1000 records of the total records will be retrieved in each batch.
    sql> SET COPYCOMMIT <Number of batches should be commited at one time>
    set copycommit 1 indicates one batch should be commited at a time.
    So if we are inserting 100,000 records then data will commit after inserting 1000 records every time.
    If you have a small rollback segment , set arraysize to less number of records and copycommit to 1.
    Syntax :-
    usage: COPY FROM <db> TO <db> <opt> <table> { (<cols>) } USING <sel>
    <db> : database string, e.g., scott/tiger@d:chicago-mktg
    <opt> : ONE of the keywords: APPEND, CREATE, INSERT or REPLACE
    <table>: name of the destination table
    <cols> : a comma-separated list of destination column aliases
    <sel> : any valid SQL SELECT statement
    Append : - Create table in the destination if it does not exist and ignore if it exist and insert rows
    Create :- Create table in the destination and insert rows
    Insert :- insert the rows only . Error occurs if the table does not exist.
    Replace :- Drop the existing destination table and creates new table with data.
    e.g.
    set copycommit 100 arraysize 1000 buffer 100000
    COPY FROM schema1/password@Db1 TO schema2/password@db2
    insert table_in_db2 (column1, column2) USING SELECT * FROM table_in_db1;
    COPY supports the following datatypes:
    CHAR
    DATE
    LONG
    NUMBER
    VARCHAR2
    By using copy command you can reduce the burden on a rollback segment by dividing the entire inserting data into pieces or batches which commit individually and thus avoid of using large rollback segment.

  • V _T702B link table between expnse key and expnse typ

    Hi ,
    I have a question regarding the assignment table for credit card clearing(v_t702b). We have 26 custom expnse typs that are paid by company but I see only few expense keys (around 7) supplied by credit card company like "MEALS....", "CAR.RENTAL.." etc. How do I map all the 26 expense types with only few expense keys(around 7) supplied by credit card company?
    Thanks, Patt

    Umer,
       For example, the credit card key for MEALS...., should be copied to MEALS1...., MEALS2....and MEALS3....etc and assign the custom expense type ZBRKFST to MEALS1.... and ZLUNCH to MEALS2.... and ZDINNER to MEALS3....correct? Then we should tell the credit card company about our assignment of these expense types to their keys MEALS1..., MEALS2.... and MEALS3....
    My question is how will the transaction done by traveller be known as Brkfast, Lunch or Dinner for the credit card company to assign to proper MEALS code and send it back to us? Ex: traveller swipes card at a restaurant for a meal and credit card company will assign it to which expense key MEALS1, 2 or 3? Thanks, Patt

  • Defining Dimensions, Attribute Hierarchies for a Link Table(Many to Many)

    I have 3 Tables in the Database
    Table 1: Transactions (Fact Table) - PK(TransactionId)
    Table 2: Relationship (Dimension1) - PK(Relationship Id), FK_TransactionId, FK_CompanyId, RelationshipType
    Table 3: Companies (Dimension 2) - PK(CompanyId)
    Table 2: Relationship table is a link table between Transactions & Companies to facilitate many to many relationship. 
    I defined Fact and Dimension tables accordingly but having issues defining Dimension & Attributes for Relationship tables
    Relationship Dimension:
    I have 3 hierarchy groups defined
    Hierarchy 1 - Relation -Relationship Type,Relationship Id(PK)
    Hierarchy 2 - Transaction - Transaction, Relationship Id(PK)
    Hiearchy 3 - Company - CompanyId, Relationship Id(PK)
    Defined the attribute relationship in the following way
    RelationshipID(PK) ---> CompanyId , RelationshipID(PK) ---> TransactionId, RelationshipID(PK)
    ---> RelationshipTYpe
    I am getting incorrect results when I deploy the cube. Not all the types are being displayed only 4 types are being displayed out of 27 types though there exists Transactions for all the Types.
    To fix the incorrect results, I tried to break the Relationship Dimension into 2 dimensions seperating Transaction(Relationship Dim) & Company,Type (Companies Dim). I tried to configure a many
    to many Relationship type between my  Companies Dim & Fact Table Transaction. But I get the error that says 
    "Companies Dim many to many dimension in the Tansaction measure group requires that the granularity of the Relationship dimension is lower than that of the Relationship measure group "
    Any help regarding how to difine Dimensions & Attribute Hierarchies on a Many to many link table is appreciated.

    Hi Jaya,
    According to your description, you are experiencing the issue when implement many to many relationship by using a bridge table in your SQL Server Analysis Services project, right?
    Generally, a bridge table will have a surrogate key for the dimension and a surrogate key to the fact table or a degenerate dimension based on the fact table. Here are some blogs which describe how to implement many to many relationship using a bridge
    table.
    http://bifuture.blogspot.com/2011/06/ssaskimball-modeling-nm-relation.html
    http://www.sqlchick.com/entries/2012/1/22/data-modeling-tip-when-using-many-to-many-bridge-tables-in-s.html
    http://social.technet.microsoft.com/wiki/contents/articles/22202.a-practical-example-of-how-to-handle-simple-many-to-many-relationships-in-power-pivotssas-tabular-models.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Linked tables, stored procedures, and locking

    I'm working on an interface between two Oracle systems. I don't know if they're on the same server or not, but they are definitely two different database instances. The plan for this interface is that when a record is created on one of the systems, it will call a stored procedure on the other system to create the record there as well. I believe the relevant information will be passed via parameters to the stored procedure (not by querying the data in the first system). The ID number created on the second system gets passed back to the first system via an output parameter.
    A concern was raised about whether something like this might cause "rev-locking". Similar issues were raised on a different interface, but that interface used a linked table between the two systems. The original design for that interface had a stored procedure initiated from the second system, and it was to update data via the linked table in the first system. But this caused some locking issues. So a different interface was written, that only used the linked table as read-only.
    So the question is, do stored procedure calls between linked databases have the same issues as updates directly to linked tables? And a better question is, is there a document or white paper out there somewhere that describes the locking issues between linked databases, and presenting the "best practices" for this type of coding?
    Any help is appreciated!
    Christine Wolak
    [email protected]

    So the question is, do stored procedure calls between linked databases have the same issues as updates directly to linked tables? I'm not aware of any issues with updates across databases. can you post a more detail version of what exact issues did you encounter when updating tables across database using database links?
    when you update a row in a table, from the same database or another one, a lock on that row will be placed for the duration of the transaction. Others will be able to read that row but not update it till the end of the local (or the remote) transaction.
    What issue(s) did you encounter?

  • How can I get the difference of  tables between two oracle server?

    We team have 2 oracle servers in the same version.
    one is develop server and the other is priduct server.
    I want to know what is difference in tables define between the two oracle servers.
    give me a method or a step or a sql script or a tool to compare these two set of tables.
    Edited by: Oracle-Sunmeng on Aug 1, 2012 6:36 PM

    Hi Sunmeng,
    Does Database Link exists between Databases ??
    If I am Clear, Are you looking Something like this.
    To Identify the tables difference, you can query the USER_TAB_COLUMNS view.
    SELECT DISTINCT table_name, 'User1' AS user_table
               FROM user_tab_columns
    UNION ALL
    SELECT DISTINCT table_name, 'User2' AS user_table
               FROM user_tab_columns@dblink
           ORDER BY 1;Which gets us all the Tables available in Both User. where you can filter based on what
    you require.
    Similary, you for column difference
    SELECT   table_name, column_name, 'User1' AS user_table
        FROM user_tab_columns
    UNION ALL
    SELECT   table_name, column_name, 'User2' AS user_table
        FROM user_tab_columns@dblink
    ORDER BY 1;If you need to count the no of columns in both Tables of different databases. Then try this,
    SELECT table_name, 'User1' user_name,
           (SELECT MAX (column_id)
              FROM user_tab_columns a
             WHERE a.table_name = b.table_name) colno
      FROM user_tables b
    UNION ALL
    SELECT table_name, 'User2' user_name,
           (SELECT MAX (column_id)
              FROM user_tab_columns@dblink a
             WHERE a.table_name = b.table_name) colno
      FROM user_tables@dblink b;And, what the Columns in both tables may be same but, if datatype and length of column differs ?????
    Thanks,
    Shankar
    Edited by: Shankar Viji on Aug 1, 2012 10:47 PM
    Edited by: Shankar Viji on Aug 1, 2012 10:49 PM

  • How to find relationship between database tables

    Hi Mate,s.
    Iam new to SAPBW , PLZ tell me , How to find releationship between database table(Transperent tables).
    Regards.
    harry

    hi harry,
    from your previous postings, i guess you are asking relationship between tables in r/3, following links may help :
    http://www.sapgenie.com/abap/tables.htm
    http://www.sapgenie.com/abap/tables_sd.htm
    http://www.sapgenie.com/abap/tables_mm.htm
    http://www.sapgenie.com/abap/tables_fi.htm
    http://www.sapgenie.com/abap/tables_ps.htm

  • Trigger in a join table between two database

    Hi an Happy new year
    I have two database, one is dedicated to security and the second for my multitenancy application
    In this two databases one have tables USER, USER_JOIN_USER_ROLE and USER_ROLE
    the second, USER (where fields are differents), USER_JOIN_USER_ROLE and USER_ROLE
    the two join table must be the same and USER_ROLE are the same in the two databases.
    I plan to use a trigger to replicate from the  application database to the security one, I already use triggers to Replicate USER and set the differents fields.
    I'm new in triggers using.
    My user replication trigger seems like that
    CREATE TRIGGER [dbo].[USER_REPLICATION]
    ON [dbo].[DM_USER]
    AFTER INSERT
    AS
    BEGIN
    DECLARE @EmployeeId int = (SELECT FKEmployee FROM inserted)
    DECLARE @Login nvarchar(50) = (SELECT LoginUser FROM Inserted)
    DECLARE @Password nvarchar(50) = (SELECT PasswordUser FROM Inserted)
    DECLARE @Tenant int = (SELECT IdCompany FROM TEST_MULTI.dbo.DM_COMPANY WHERE IsTenant = ''Y'')
    DECLARE @CompanyId int = (SELECT ExtIdCompany FROM TEST_MULTI.dbo.DM_COMPANY WHERE IsTenant = ''Y'')
    DECLARE @LegalEntityId int = (SELECT FKLegalEntity FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
    DECLARE @LastName nvarchar(255) = (SELECT LastNameEmployee FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
    DECLARE @FirstName nvarchar(255) = (SELECT FirstNameEmployee FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
    DECLARE @EMail nvarchar(255) = (SELECT EMail FROM inserted)
    SET NOCOUNT ON;
    INSERT INTO DM_SECURITY_MASTER.dbo.DM_USER(LoginUser, PasswordUser, FKCompany, TenantId, LegalEntityId, LastName, FirstName, Email)
    VALUES (@Login, @Password, @CompanyId, @Tenant, @LegalEntityId, @LastName, @FirstName, @EMail)
    UPDATE [TEST_MULTI].[dbo].[DM_USER] SET ExtIdUser = (SELECT IdUser FROM [DM_SECURITY_MASTER].[dbo].[DM_USER]
    WHERE LoginUser = @Login
    AND PasswordUser = @Password
    AND FKCompany = @CompanyId
    AND TenantId = @Tenant
    AND LegalEntityId = @LegalEntityId
    AND LastName = @LastName
    AND FirstName = @FirstName
    AND EMail = @EMail)
    WHERE IdUser = (SELECT IdUser FROM Inserted)
    END
    but I cannot figure how to use a trigger to update a collection and not find anything on it, any help welcome
    I use Windows Identity Foundation in my code and update or insert can set multiple rows

    Hello and thanks for help.
    The trigger i give as example already works fine but Fanny Liu is for sure better than mine and I will try it. Users insertions are not multiple, only one user can be inserted at the same time
    My question was most on using triggers to update a collection via a Join table between my user and users roles
    I wrote it Yesterday for INSERT
    USE [TEST_MULTI]
    GO
    /****** Object: Trigger [dbo].[USER_ROLE_INSERT_REPLICATION] Script Date: 01/03/2014 10:56:36 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:
    -- Create date: 2014/02/01
    -- Description: Replication INSERT on MASTER DATABASE
    -- =============================================
    ALTER TRIGGER [dbo].[USER_ROLE_INSERT_REPLICATION]
    ON [TEST_MULTI].[dbo].[DM_USER_JOIN_USER_ROLE]
    AFTER INSERT
    AS
    DECLARE InsertCursor CURSOR FOR (SELECT FKUser, FKUserRole FROM inserted)
    DECLARE @UserId int, @UserRoleId int
    OPEN InsertCursor
    FETCH NEXT FROM InsertCursor INTO @UserId, @UserRoleId
    WHILE @@FETCH_STATUS = 0
    BEGIN
    DECLARE @UserMasterId int = (SELECT ExtIdUser FROM TEST_MULTI.dbo.DM_USER WHERE IdUser = @UserId)
    IF NOT EXISTS(SELECT * FROM DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE WHERE FKUser = @UserMasterId
    AND FKUserRole = @UserRoleId)
    INSERT INTO DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE (FKUser, FKUserRole) VALUES (@UserMasterId, @UserRoleId)
    FETCH NEXT FROM InsertCursor INTO @UserId, @UserRoleId
    END
    CLOSE InsertCursor;
    DEALLOCATE InsertCursor;
    And for DELETE
    USE [TEST_MULTI]
    GO
    /****** Object: Trigger [dbo].[USER_ROLE_DELETE_REPLICATION] Script Date: 01/03/2014 10:57:58 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:
    -- Create date: 2014/02/01
    -- Description: Replicate DELETE on MASTER DATABASE
    -- =============================================
    ALTER TRIGGER [dbo].[USER_ROLE_DELETE_REPLICATION]
    ON [TEST_MULTI].[dbo].[DM_USER_JOIN_USER_ROLE]
    AFTER DELETE
    AS
    DECLARE DeleteCursor CURSOR FOR (SELECT FKUser, FKUserRole FROM deleted)
    DECLARE @UserId int, @UserRoleId int
    OPEN DeleteCursor
    FETCH NEXT FROM DeleteCursor INTO @UserId, @UserRoleId
    WHILE @@FETCH_STATUS = 0
    BEGIN
    DECLARE @UserMasterId int = (SELECT ExtIdUser FROM TEST_MULTI.dbo.DM_USER WHERE IdUser = @UserId)
    DELETE FROM DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE WHERE FKUser = @UserMasterId AND FKUserRole = @UserRoleId
    FETCH NEXT FROM DeleteCursor INTO @UserId, @UserRoleId
    END
    CLOSE DeleteCursor;
    DEALLOCATE DeleteCursor;
    It works fine
    Thanks for help, I will mark it as answered

  • Link Pivot tables between workbooks

    I have two BEx workbooks A and B.  Workbook A has the query data, pivot table and a pivot chart.  I need to create a new Workbook B and link only the pivot table from Workbook A to the Workbook B. 
    Can we link a pivot table between two workbooks?
    Raadooo

    Thanks a lot,  Chivukula !!!
    This is what I got.  I have 5 huge separate queries  saved as workbooks.  Each of these workbook has the query data.  I created pivot table from this data and generated charts in the workbook for each of the seperate queries. 
    But now, I need to join or link only the charts into one workbook, to display a dashboard view.  This dashboard view should have all the charts.
    Since I would like to get the charts as a dynamic pivot charts, I want to link the pivot table from the exisiting workbook to the new workbook.
    Can this be acheived?  If not what is the other possible solution?
    Thanks a lot for your help again!!!!

  • Difference between Database view and Table

    Hi there,
    Can anyone tell me the difference between Database view and Table.
    Will the Database view query be more faster than a database table?

    Tables and database views can be defined in the ABAP Dictionary.
    These objects are created in the underlying database with this definition. Changes in the definition of a table or database view are also automatically made in the database.
    Data from several tables can be combined in a meaningful way using a view (join).
    You can also hide information that is of no interest to you (projection) or only display
    those data records that satisfy certain conditions (selection).
    Database views implement an inner join. You only get those records which have an
    entry in all the tables included in the view.
    in views db modifications are not possible
    views only contain data at run time
    when they consult the database
    in case of views the join definitions are already sstored in the database itself
    whereas join as open sql is a query to oracle  database as similar select statements
    Views are optimized by SAP and stored in the repository while Joins
    are in reports that needs to be compiled at every execution
    Reward if helps
    Regards,
    Senthil
    Message was edited by: senthil kumar

  • How to copy table from database in one forest to a database in a different forest?

    Hello Community
        Using Wndows 2008 Server Enterprise there exists 2 Forests,
    each containing their own SQL Server 2008 installations, a scenario exists as follows:
         a)"Domain1" resides in "Forest1" which has SQL Server 2008 containing
             a database named "Database1" which contains a table named "Table1".
         b)"Domain2" resides in "Forest2" which also has SQL Server 2008
             but containing a database named "Database2"which contains a table
             named "Table2".
        I tried to use <domain_name>.<server_name>.<owner_name>.object
    but that syntax didn't work.
        How can I copy "Table2" from "Database2" into "Database1"
    (keeping in mind the databases are in different forests and domains)?
        Thank you
        Shabeaut

    Configuring a linked server might help you
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/329709ca-349d-490d-9b42-7443caa97364/how-to-created-linked-server-between-two-different-domains?forum=sqlsecurity
    OR
    Generate the schema with data of Table1 using scripting wizard under advance setup and execute the sql file in domain2.
    -Prashanth

Maybe you are looking for