How to query data from other Database

Dear Community;
Please help me, I want to connect with another Database in apex query. I have been created TNS and also query run proper in Toad, but when I give schema name with table it does not run and give error.
So how I can use this query in Apex.
Regards
Shahab Ahmed Khan

We do this by creating a database link from DB1 (Apex database) to DB2 (main database) then writing queries like this in Apex:
select foo, bar from atable@db2

Similar Messages

  • How to extract data from oracle database directly in to bi7.0 (net weaver)

    how to extract data from oracle database directly in to bi7.0 (net weaver)? is it something do with EDI? can anybody explain me in detail?
    Thanks
    York

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • Query Data from other Oracle Database into current

    Hi all,
    I have to query data from another oracle database into the current oracle database. Because the customer has standard edition, I cannot use a pipe. I tried "SELECT column_name FROM external_oracle_db.schema.table WHERE column_name = 'column_value';" Unfortunately this does not work.
    Does anyone have a suggestion?
    Thanks
    Hans

    Have you tried with Database links?
    SELECT column_name FROM schema.table@external_oracle_db WHERE column_name = 'column_value';
    Satish

  • How to query data from Oracle, MySQL, and MSSQL?

    For an environment consisting of Oracle 11g/12c enterprise edition, MySQL 5.7 community edition, and MSSQL 2008/2012 stanard/enterprise edition, is there any major issue using DG4ODBC to query data from all 3 platforms?
    Is there other free alternatives?
    If the queried data is mostly contained in MySQL or MSSQL, will it be more efficient to query from MySQL or MSSQL?
    If yes, any suggestion of how to do it in those platforms? I know MSSQL can use linked server but it is quite slow.

    mkirtley-Oracle wrote:
    Hi Ed,
        It is semantics.  By multiple instances I mean you have the gateway installed in an ORACLE_HOME which has 1 listener. However, if you are connecting to different non-Oracle databases or different individual databases of that non-Oracle database then you need multiple gateway instances for each database being connected.  I did not mean that you need a gateway installed in a separate ORACLE_HOME for each non-Oracle database to which you are connecting.
    Each of these would have a separate instance file within that ORACLE_HOME/hs/admin directory with the connection details for the non-Oracle database to which that instance connects.. So, you would have -
    initgtw1.ora - connects to MySQL
    initgtw2.ora - connect to SQL*Server northwind database
    initgtw3.ora - connect to SQL*Server test database
    etc
    etc
    Each of these instances would have a separate entry in the gateway listener.ora.
    In MOS have a look at this note -
    How To Add A New Database or Destination To An Existing Gateway Configuration (Doc ID 1304573.1)
    Regards,
    Mike
    Ah yes, we are in agreement, it was just semantics.  Thanks.

  • How to fetch data from single database table using 2 internal tables.

    Hi friends,
    i am a new user of ABAP and also SDN.
    i need a help. 
    i want to fetch data from one database table based on primary keys of 2 internal tables.  how to put in where clause.
    Thanks in advance.

    hii
    refer to following code ..i hope it will help you
    SELECT matnr                         " Material Number
        FROM mara
        INTO TABLE i_mara
       WHERE matnr IN s_matnr.
      IF i_mara[] IS NOT INITIAL.
        SELECT matnr                       " Material Number
               werks                       " Plants
               prctr                       " Profit Center
          FROM marc
          INTO TABLE i_marc
           FOR ALL ENTRIES IN i_mara
         WHERE matnr = i_mara-matnr
           AND werks IN s_werks.
      ENDIF.                               " IF i_mara[] IS NOT INITIAL
      i_output = i_marc.
      IF i_marc[] IS NOT INITIAL.
        SELECT matnr                       " Material Number
               werks                       " Plants
               lgort                       " Storage Location
          FROM mard
          INTO TABLE i_mard
           FOR ALL ENTRIES IN i_marc
         WHERE matnr EQ i_marc-matnr
           AND werks EQ i_marc-werks
           AND lgort IN s_lgort.
      ENDIF.                               " IF i_mara[] IS NOT INITIAL
    regards
    twinkal

  • How to retrieve data from other websites?

    Hi all,
    Don't know if anyone can point me in the right direction.
    How can I retrieve or fetch data from other website&rsquo;s (*Database*) ?
    I&rsquo;m trying to build a web application that would retrieve and fetch data from other website&rsquo;s (Database) like the www.comparethemarket.com.
    The data I&rsquo;m trying to fetch it is in database, in my opinion I think I have to make a http web request then send parameters, then get the result. I could not find any tutorials
    on the web,
    Thank you.

    Fahad_24 wrote:
    Hi all,
    Don't know if anyone can point me in the right direction.
    How can I retrieve or fetch data from other website&rsquo;s (*Database*) ?
    I&rsquo;m trying to build a web application that would retrieve and fetch data from other website&rsquo;s (Database) like the www.comparethemarket.com.
    The data I&rsquo;m trying to fetch it is in database, in my opinion I think I have to make a http web request then send parameters, then get the result. I could not find any tutorials
    on the web,
    Thank you.Unless the website provides an interface to their data, you are most likely not even allowed to do this. There is only one way to find out: contact them and ask about it or look around their website if their is a manual that describes how to do it. If there is such an interface, it will usually be some kind of web service (such as a SOAP interface).

  • How to run report from other database

    hi,
    i have an application running on oracle 10g forms (many forms & reports),i want to run a report from other database using a form,it should be run on this application & same report server. so if it is possible so tell me how can i do this ?
    thxs

    If you have another Oracle database you can use the following command to create a link to it from the one you are currently logged into
    CREATE PUBLIC DATABASE LINK my_db_link
    CONNECT TO other_oracledb_usernane IDENTIFIED BY other_oracledb_password
    USING 'remote_oracledb_name';
    When you issue this command the 'remote_oracledb_name' must exist in your TNSNAMES.ORA file so that the remote database can be 'found'
    If this is still not enough info I would suggest that you talk to someone on your DBA team to help set up the link.
    Mark

  • How to migrate data from one database to another for a specific time frame

    Hi
    This is the scenario:
    We have 2 databases:
    PTT : THis has data from march 11 to March 19 that was created when the production was down due to a crash
    PROD : THis was recovered after March 19. Hence has no data created between March 11 and March 19
    How do I transfer this data from March 11 to March 19 from PTT to PROD so that Production can be up to date asap.
    Please let meknow the methods to get this done
    Regards
    Gayathri

    Hi,
    You could use EXP/IMP to move the data from PTT to PROD. But, you should be careful with sequences, modification to the same data.....
    eg Customer Address was updated between Mar 11 - 19, again the same customers was updated after 19 Mar, under this situation if you load the data from PTT you would be wrongly updating the data.....
    You have to study well and apply changes...........

  • How to read data from Logical Database ADA for more than one financia year

    Hi,
    I need to read data from ADA logical database and ANLCV node for current financial year 2007 and for the next 3 years – 2008, 2009, 2010. When I do this using program attached below, I receive only data for one year, which is entered at the selection screen in the field BERDATUM. How should I modify my program to read ANLCV node for more then one year ? Could anybody help me ?
    Kind regards,
    Zbigniew Debowski
    REPORT  ZWRZD075.
    NODES: anlav, anlcv.
    START-OF-SELECTION.
    GET anlav.
    WRITE:/ anlav-anln1, ' ', anlav-anln2.
    GET anlcv.
    WRITE:/ anlcv-kansw, ' ', anlcv-knafa, ' ', anlcv-gjahr.

    Hi!
    Have you already tried your luck in Java Programming forum?
    Regards,
    Thomas

  • How to read data from SAP database in java?

    Hi All ,
    I want to read some tables from SAP database in java? How to connect to SAP database in java.I want to read the data from SAP NetWeaver BW 7.3.
    Please help..

    Download Vder [http://binhgiang.sourceforge.net/site/download.jsp|http://binhgiang.sourceforge.net/site/download.jsp]
    Extract date from website, output to xml format then save to database (MySQL, Oracle,...)
    Screenshot: [http://binhgiang.sourceforge.net/xmlalbum/screenshots.html|http://binhgiang.sourceforge.net/xmlalbum/screenshots.html]
    Edited by: Nhu_Dinh_Thuan on Jul 23, 2009 9:55 PM
    Edited by: Nhu_Dinh_Thuan on Jul 23, 2009 9:56 PM

  • How to retrieve data from the Database after deleting rows from VO ?

    Hello,
    I am using Jdeveloper 11.1.2.1.0
    I have a master and a child .
    So according my use case when a value in the master vo changes the corresponding child has to be deleted.
    but when i change back to any other value i want to undo the delete operation and get back the values in the child.
    Is there any way to do it?
    Regards,
    Nigel.
    Edited by: Nigel Thomas on Mar 29, 2012 5:07 AM
    Edited by: Nigel Thomas on Mar 29, 2012 5:09 AM

    Hi all,
    I want to do a validation based on a SelectOneChoice List Value.
    Based on which value in the select one choice is being selected, thedata from the VO should be DELETED or NOT-DELETED.
    To do this I wrote a Managed Bean and the delete part is working fine if a particular value of the SelectOneChoice is selected.
    Since the rows are deleted from the VO, after I change the SelectOneChoice value to the previous one I cannot retrieve the rows.
    I thought of two ways:
    1. As the Deleting option in the SelectOneChoice is selected the rows should be deleted from the VO and when reverted back to not-Deleting option the Rollback of Transaction method written in the Managed Bean should take place.
    2. As the Deleting option is selected the data should be deleted from the VO and when reverted back to non-Deleting option, a query should be made from the Database.
    The first plan was dropped because it is not VO-specific. If there are more than 1 VO in the page then whatever changes are made in the page will be reverted back as soon ad Rollback of transaction is done.
    So the now i am left to go with the second plan.
    Is there any way to implement the second plan?
    If so...Will it compromise the performance of the application?
    Or else, Is there any other way to implement my Use-Case ???
    Regards,
    Nigel.

  • How to load data from different database

    Hi,
    My problem is how to load Foxpro 2.6/clipper data into oracle 8 with all its structure and data with SQL loader or other utility if any.
    And also how can i integrate existing forpro system into Oracle. i.e client will work on Foxpro application and we will only take its output(data files) on daily basis and convert it into Oracle 8.
    Please find any solution.
    Regards
    null

    You can also try to make up an ODBC connection to Foxpro and convert the data from foxpro to oracle using the COPY command (see docs on PL/SQL & OCA). I remember that foxpro/clipper are running on MS-DOS, so I don't know if you can establish an ODBC connection to oracle which can be used from the foxpro/clipper application to use it as a frontend for an oracle database.
    Regards, Kai
    null

  • How to retrive data from MYSQL database beginner question

    I need to know a method, on how to retrieve values from a MYSQL database. I finally managed to insert data to a MySql database using hibernate, with the help of google. but, i couldn't find any helpful article on google, on retrieving data, will some plzz help me, by directing me to a site that has sample codes ??
    i am actually new to MYSql and Databases in java, so plzz do help me, i am lost here,,, :(

    Oh, it's Hibernate. In the future, please use the forums at their own site.
    Answers on how to use Hibernate are usually available in the excellent "Hibernate Reference Documentation" available here.

  • How can extract data from foxpro database?who can help me?

    I use jdbc-odbc to connect to my database ,database is foxpro, in the database there is a table named "tlb", I can select the table the total roll nums,but when I select the data from the roll, I cannot get the data, this data type is memo type, I don't know how get this data!

    I remember question about a memo type in Access and maybe also SQLServer. Is this the same like in FoxPro?
    If, then you might get help by searching this forum for "memo".

  • How to move data from one database to another one?

    I 'd like to build up a new database, some of the data would come from an old database, then I have to make two connection objects to both databases, (two statement objects...) retrieving the data from the old one and inserting them to the new one.... sounds reasonable, huh? but it could not work this way... "........it would have caused the duplicated value , blah, blah..." even though I made two tables in two databases completely different, that errors are still there. seemed I cannot clone that table.
    could you guys have any better ideas? and why couldn't I go this way?
    the database: cloudscape3.01
    two databases are all on my local PC (WinNT4.0)
    thanks

    If you are getting dupicate record errors, then look at your recordset objects and make sure they are both pointing at seperate databases, and check the one you are using to output and make sure it isn't just writing NULL, if it is then trace up the line: your input (read) recordset may be reading NULL too.

Maybe you are looking for