How do I select from multiple schema's

How do I select from multiple schema's
Tried:
SELECT * FROM schema1.table1, schema2.table2
WHERE schema1.table1.column1 = schema2.table2.column2;
Errored......

Thanks
We finally got in touch with our DBA and he said the same thing.
SELECT t1.*,
t2.*
FROM schema1.table1 t1,
schema2.table2 t2
WHERE t1.column1 = t2.column2;
I'll try it afther I finish a task my boss just gave me.
BRB then.

Similar Messages

  • SELECT from multiple schema's

    How do I select/insert/update/delete from multiple schema's.
    Tried:
    SELECT * FROM schema1.table1, schema2.table2
    WHERE schema1.table1.column1 = schema2.table2.column2;
    Errored......

    Hello
    you need to use an alias for each table
    tylerd@UAT51> select dual.dummy from dual, dual
      2  /
    select dual.dummy from dual, dual
    ERROR at line 1:
    ORA-00918: column ambiguously defined
    tylerd@UAT51> select dual_1.dummy,dual_2.dummy from dual dual_1, dual dual_2
      2  /
    D D
    X X
    1 row selected.

  • How to access tables from multiple schemas

    Hi,
    I have access to 2 different schema (schema_a, Schema_B) through my APEX environment... I have a query that's based on tables from both the schemas... something like this
    select SCHEMA_A.table1.column1, table2.column2
    from
    SCHEMA_A.table1, table2
    it is giving me a message that table doesn't exist.
    Please advice.
    Thanks

    You need to grant the required permission (if there is no restriction then you can use GRANT ALL), You can give the permission to particular user on the schema.
    conn / as sysdba
    grant select on userA.table_name to userB;
    connect userB/passwordB
    select userA.table1.column1, table2.column2
    from
    userA.table1, table2;Refer these links,
    https://forums.oracle.com/forums/thread.jspa?threadID=616903
    http://www.techonthenet.com/oracle/grantrevoke.php_
    Thanks
    Lakshmi

  • SELECT from multiple schemas

    I have an Oracle database with two schemas in it, there's a table in each schema and two colums in each. with the exception of the schema name they're identical.
    Schemas: rate1, rate2
    Table: rate_details
    Columns: rate_file, rate_live
    Each table will only ever have one row in it. The rate_file column will contain a filename and the rate_live will contain either a Y or N.
    Only one of the schemas will have it's rate_live column set to Y at any one time.
    I want to write an SQL statement that will tell me what the value of rate_file is by providing the rate_live value.
    The statement I have is as follows:
    SELECT r1.rate_file, r2.rate_file
    FROM rate1.rate_details r1, rate2.rate_details r2
    WHERE rate_live = 'Y'
    My problem here is that rate_live is ambiguous as it's in both schemas, so it wants me to tell it which schema to look to.
    Is there a way around this? Ultimately, if my data was as follows, the only output I'd want is date_250205:
    Schema (rate1)
    rate_file is date_180205
    rate_live is N
    Schema (rate2)
    rate_file is date_250205
    rate_live is Y

    Richard:
    I don't think that there is a more efficient way to do this query. Given that "Each table will only ever have one row in it", Oracle will always full-scan both tables anyway. In either of my queries, Oracle would essentially, full scan rate1.rate_details, then full scan rate2.rate_detail and concatenate that to the first resultset. The combined rows would then be filtered (i.e. Inspect each row for the value of rate_live) to find the one(s) matching the criteria.
    I don't really see this problem as being a grouping problem at all, and any solution using GROUP BY would only add at least one sort for the group by.
    Generally speaking, I see UNION [ALL] queries as answering a different set of questions than grouping queries, although the tw can be, and often are, combined. I would be interested to see where you saw the comments about UNION ALL being replaced by Grouping Sets.
    John

  • How to select from multiple addresses of account in IC Web Client

    Hi all,
    We are implementing a B2C scenario for IC Web Client. We have customers with multiple addresses. However, when we search the acount, only standard address comes to screen.  We want to be able select the related address, and then confirm the acount with that address.
    Is there any way to customize the Web Client in order to be able to select from multiple addresses of the acount?
    Thanks in advance.
    Edited by: Danisman Danisman on Aug 31, 2010 2:52 PM

    Thanks for the answer. Yes, we are using 7.0 but in the account identification screen, there is no personalize button ( I assume you are suggesting adding an addres block by using that button, right?).
    We checked the necessary customizing : there is an entry for fucntional profile PERSONALIZATION : ALL_ENABLED.
    Should we do something else to show the button?
    Thanks again.

  • How to pickup files from multiple directories

    Hi all,
    How to pickup files from multiple directories and send it to two different folders at target
    Ex:
    files\xi\us\US.txt
    files\xi\uk\UK.txt
    i need to pick up the above mentioned two files and send it to the following paths
    app1\files\us\download\US.txt
    app1\files\uk\download\UK.txt
    US.txt has to goto US folder and UK.txt has to goto UK folder only
    Regards

    Hi,
    To pick form multiple folders, select Advanced Mode for file selection in file adapter..
    there u can specify directory name/file names
    Refer
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    To put those files at multiple folders write a command line arguments for this.. go through this weblog...
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    XI/PI: Command line sample functions
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    Hope this will help you....
    Regds,
    Pinangshuk.

  • Select from Multiple tables

    Hi,
    I am doing select from multiple tabels (2) in one SQL query.
    How to get the result as it says.. Column name is incorrect ?
    thanks,
    -raj

    treat the resultset as noraml. You get it in sequence as you have specified the column names. You use rs.getXXX(index) instead of columnname

  • How can I select from drop-down list and jumping to selected subform?

    I using LC Designer ES2 vers 9. Developing XDP. How can I Select from a drop-down list the appropriate selected subform (jumping to the selected subform on the page)?
    drop-down list...A (jump to subform1)
                             B (jump to subform2)
                             C (jump to subform3)
    subform1
    subform2
    subform3
    ....end of form

    Hi,
    you cannot set focus on a subform but on a field, as only interactive objects can be focussed.
    From a dropdowns exit event the script will look this way:
    switch (this.rawValue) {
              case "A" : xfa.host.setFocus("form1.page2.field1"); break;
              case "B" : xfa.host.setFocus("form1.page2.field1"); break;

  • Selecting from multiple tables, into one internal table

    Hi,
    What is the best & most efficient method of selecting from multiple table (in my case 6,) into one internal table?
    Thanks,
    John
    Points will be rewarded and all responses will be highly appreciated.

    I have simple example :
    First one - Join 5 tables
    data : f1 type i,
              f2 type i,
              f3 type i.
    start-of-selection.
    get run time field f1.
    write the query 4 or 5 tables join.
    get run time field f2.
    f3 = f2 - f1 ( Total time).
    Second one - joins 3 table and use for all entries
    data : f1 type i,
              f2 type i,
              f3 type i.
    start-of-selection.
    get run time field f1.
    write the query 3 tables join and use for all entries
    get run time field f2.
    f3 = f2 - f1. ( Total time )
    Finally you can have time diffrence between the both sql statement.

  • "CLOSED":How to plan inventory from multiple orgs simultaneously using MRP?

    Hello everybody,
    How to plan inventory from multiple organizations simultaneously using SCP?
    My customer found that in supply chain planning (MRP) system always plans in single manufacturing organization, say, ATC, firstly. If set in organization item master, the source type as 'Inventory' and the source organization as another trading organization name, say, ANX. if there is insufficient inventory in ATC, SCP-MRP would plan in ANX, disregard of the inventory exist in ANX for the item.
    But for some items, there are both inventory in ATC and ANX and we want plan BOTH their inventory simultaneously instad of firstly ATC and then ANX.
    Is there any standard function in Oracle that can do so? I found that the sourcing rule cannot help in this case.
    A simple test case is described in
    https://gtcr.oracle.com/gtcr-dir/gtcr_4607/5580425.992/Alternative_to_plan_multi-org_MRP.doc
    Thanks
    Catalina
    Message was edited by:
    user447176

    Catalina,
    Net the inventory simultaneously? Its not quite clear what your client wants.
    Even in the old SCP, you can use sourcing rules to first net inventory in org1 and then net the inventory in org 2 via a transfer from rule. The key point is it is always incremental based on where you place teh demand and then you provide source to fill that demand.
    One restriction that ASCP still has up to 11.5.10 is that you can only have sourcing rules going in one direction. This means that you can't have a rule that sources ORG1 from ORG2 for item A, then have the revers in ORG2 sourcing from ORG1. That won't work, ASCP will randomly ignore one of the rules.
    The best choice may be to use GOP with a sourcing split % so that yo do consider the inventory in both orgs when demanding the order, but it would still be done by checking ORG1 then ORG2.
    Hope this helps.
    Kevin Creel

  • How to develope application with multiple schema

    Hi,
    In my application, there is 3 schema, forms are from different schema, but the database is one. How should I manage it, When i open the form with different schema I am not getting the expected result,
    I am using Oracle 10g Forms & Database
    Thanks in advance
    Rizly

    hi,
    what database-user is the user connected with, when executing the forms ? Is it one of the three schemaowners or has each logical user his own database-user?
    About your db-objects:
    I would create 3 roles, one for each schema, and grant the needed privileges for one schema to the according role
    Example:
    CREATE ROLE RL_SCHEMA1;
    GRANT SELECT, INSERT, UPDATE, DELETE ON SCHEMA1.TABLE RO RL_SCHEMA1;
    ...Then you can grant the roles to the databaseuser you are connected with at runtime.
    If you use named users (each logical user has it's own database-user) then you assign each user only those roles he needs.

  • JDBC-XI-FILE scenario. How to extract data from multiple tables

    Hi,
    At this moment I didn't have the access for XI system. So here I have some silly question. Could you please clarify the same ??
    If I got to extract data from single table using JDBC adapter I can put the below query in communication channel
    SELECT *FROM orders WHERE new='true'.
    But if I got to extract data from multiple tables, logic to be used should be like as shown below. ( from previous thread------prabhu).
    SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP
    FROM <Table_1> INNER JOIN <Table_2> on
    <Table_1>.CARDNO = <Table_2>.CARD
    where REC_DAT = <condition>
    union
    SELECT <Table_2>.EID, <Table_2>.FName, <Table_2>.LName, <Table_1>.REC_DAT, <Table_1>.DESCRP
    FROM <Table_1> INNER JOIN <Table_2> on
    <Table_1>.CARDNO = <Table_2>.CARD
    where REC_DAT = <condition>
    But my query is ........how to put the above entire code in one line. (i.e in Qery place of communication channel ) ??
    Thanks
    Kumar

    Hi Palnati,
        You either use a select query with join or a stored procedure which will contain the logic to extract the data from multiple tables. But, the limitation in case of stored procedure is u can hv only one selct query in it.
    You write ur actual query provided in the parameter 'Query SQL Statement". u can also wrt a stored procedure in it. Also, u can provide a update statement in it which will update a certain flag so tht u don selct the data again.
    Check the following link
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm</a>
    Regards,
    Akshay
    Message was edited by:
            Akshay Salunke

  • Sample PHP Service selecting from multiple tables

    Hi all!
    I have the following challange:
    How do I properly set up my PHP-service to insert, select, update and delete values from multiple tables?
    So far, the standard templates generated by Flash Builder is based on a single table.
    Example: I have 2 tables: [person] and [school]
    [person] has [person_id, first_name, last_name, birthdate]
    [school] has [school_id, person_id, school_name, city]
    One [person] can have multiple [schools]
    How should I define the selectByID function in PHP to be able to have
    First name: [TextInput /]
    Last name: [TextInput /]
    Birthdate: [DateField /]
    Schools:
    [TabBar: School1, School2, School3 /]
    [ViewStack1]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack1]]
    [ViewStack2]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack2]]
    [ViewStack3]
    School name: [TextInput /]
    Location name: [TextInput /]
    [/ViewStack3]]
    And even more interesting: How do I update all these fields back to the database?

    First, the relationship between school and person is many-to-many NOT one-to-many -- you will need to add a junction table.
    From the form you have given I would handle insertions like this:
    loop through all the schools and see if the school already exist in the DB. If so, then store the school_id. If not, then create a new record and store the id. You should have an array collection of store_ids by the end of the loop
    Check whether the student exists w/in the DB. If so, then you might consider aborting the operation or you could opt to do an update. If the student doesn't exist, then create a new student record and store the new student_id (mysql::insert_id)
    Loop through the school_id array and add new student_id/school_id records into the junction table.
    Retrieving records is much simpler -- it's just a join on the tables i.e. "SELECT * FROM student INNER JOIN school_student ON student.student_id = school_student.student_id INNER JOIN schools ON school_student.school_id = school.school_id WHERE student.first_name = 'John' AND student.last_name = 'Doe' (assuming there aren't more than one John Does of course!).
    - e

  • Select from multiple tables without join statement

    Hey Gurus,
    I would like to make a select from a multiple tables to check if there is any reference to my data. I would like to do it with some elegancy, but I don't know how.
    Is in abap sql possible to do it only with the select statement?
    Or I was also think about a solution that I should fill some data structure with all of the tables which I want to select from and then just loop that data structure and do the select seperately from all of the tables. I just need to check if it founds some results, so no need to store it. If this solution would be fine what data structure should I use?
    Or can tell me what would be the best for this?
    My code for select from one table, which I want to make for multiple tables:
    SELECT SINGLE id_kniznice FROM zbr_t_autori INTO wa_id
           WHERE id_kniznice EQ ls_extract-zview-id_kniznice.
         IF sy-dbcnt > 0.
           MESSAGE i000(zbr_msgc_lib).
           ls_extract-flags-vim_mark = '*'.
           MODIFY extract FROM ls_extract.
    ENDIF.   
    Thank you for any posts.
    Regards,
    Robert

    And there we go again...
    Read this topic:
    For All Entries is NOT better than INNER JOIN in most cases
    And this one:
    inner join vs for all entries
    Also that one:
    Re: LOOP AT vs INNER JOIN
    JOINs are really better than for all entries in most cases. Problem is people tend to ignore basic things like using pks or indexes while making them.

  • How to import photos from multiple iphoto libraries to iPad

    How do I import photos from multiple iPhoto libraries from my iMac to the new iPad? I have 4 different iPhoto Libraries on my iMac.
    I can import photos from  iPhoto library 1,  to the iPad, but when I import photos from iPhoto Library 2, created on my iMac to the iPad,
    it deletes the original photos that I imported from the first iPhoto Library and replaces them with the import from library 2.
    I only want to import selected photos from each library to my iPad. Can someone plese help me?

    As Ralph has suggested, if you want to sync photos from your computer, you must include all photos that you want to sync - with each and every sync. You cannot import photos from another Main photo folder on the computer. You must create an all-in-one photo library in iPhoto and sync from that folder. You can select one level of sub folders from within that main folder, but all of those folders must be included in the main folder - in your case it is in iPhoto. That is just how the sync process works with Photos.
    I don't know how using third party apps affects the photos that you have already synced from iPhoto, but take a look at these apps in this Google search. Maybe Wifi transfer is the way to go for you.
    http://www.google.com/search?q=wifi%20photo%20transfer%20computer%20to%20iPad

Maybe you are looking for

  • ICal on my MacBook Pro has been "updating" for days...??

    I have an iMac, MacBook Pro, iPad and iPhone.  I have been using iCloud since it came out (running Lion).  iCal on my MacBook Pro has been "updating" for several days.  Also - when I add an event on the MacBook, it does not show up on any of my other

  • Help!! ipod touch 2nd gen (8gb) is running by itself!

    I just got a ipod touch 2nd gen (8gb) from a friend. This ipod has some problem.. it is running by itself! When I on it, and for example go to Settings, it will just randomly go to a next selection as if responding to my selection but I never touch a

  • How do I extract pages from a Secured PDF file

    How do I extract pages from a Secured PDF file?

  • The interface is so big, that I can only see a small section of the screen.

    I installed Photoshop CC 2014 on Windows 8.1 operating system. I inadvertently checked a preference in the 'experimental' I think, that has caused the interface on my 17'' Dell CRT to be so big that I can't navigate around to change the preferences a

  • Adobe - what am I doing wrong?

    Sorry if this has been covered elsewhere...can't find an answer... I needed to view certain docs on the internet requiring Adobe, so I downloaded it off the site, reader installed properly, appears in my Applications, but does not respond and never o