Query to extract data from source DB driver using process mapping pre...

Hi all
I have a source for the query to retrieve the data from the source database. Looking for suggestion what could be the best approach to extract data from the source database.using owb 11 GR 1 material.
I'm in printing, create the process of mapping driver prerequisite for aid to perform immediate with Create table T1 as a sql query. Petition to the sides of the Insert into T1 Select * from Source_Table in the different database.

Certainly, need to create Db users in the Source database, to get privileges to read the data of source_database.
Is - this good aproach to or of any other alternative to achieve this.

Means, create the table in the transit area (desired area, where I am) and using driver mapping process before you run the select query to retrieve data from a data source.

Would apreciate your previous answer.
Thank you
MAK

You can mark Correct or useful if it solves your purpose.

Tags: Business Intelligence

Similar Questions

  • DV7 - 7333cl: how to extract usable data from a bad drive using 22 pins adapter usb to SATA on the new HD

    Greetings HP Forum,

    Recently, I replaced a bad hard drive on my laptop. I need now step by step procedure to extract usable data from the wrong drive using 22 pins adapter usb to SATA on the new HD.

    NOTE: I can't not all data that especially if some of the software downloaded on the replaced disk can be altered. Should I first download Internet Antivirus to protect my new hard drive? I'm not an expert, or even close to this when you work on the back of the laptop, so I'll have to step by step how to download and to partition the data recoverable and software, etc..

    Thanks in advance for your help... I greatly appreciate it!

    See you soon!

    Wes

    It is not complex. Attach the drive to the adapter and connect it to any other computer with good antivirus and antispyware installed. I use Malwarebytes and Avast. When you connect the adapter with the drive connected to the usb port, the drive will appear and it will be assigned a letter maybe E:\ or F:\ or something else. Immediately, he analyzes with the antivirus and anti-spyware. Quarantine or delete any virus or malware it finds. Then, it's just a matter of navigate the disk and copy and paste the contents of the host computer in a directory for this purpose. Obviously, you can copy from documents word, photos, music files, but you cannot copy the applications like Microsoft Word, iTunes. Photoshop.  You may need to take ownership of the files on the old hard drive, but Windows will guide you through this. Don't know what else I can answer.

  • How to extract data from SAP and COBOL using ODI

    Hi people,

    Can you please let me know the procedures in ODI to extract data from SAP and COBOL?

    Thank you all for the help.

    Hello

    You can download the Patch 8571830 to Oracle metalink.

    It has a new technology 'SAP ABAP' and KMs to extract and load data-
    RKM SAP ERP and SAP to Oracle ERP LKM.

    Thank you

  • Failed to load data from the staging area using the map of ERP SAP ABAP

    Hello

    I am new to ODI and some challenges. ODI 11g (11.1.1.6.0) I want to move data from a SAP EHP6 system to a warehouse of the oracle. I got the table that I need, using the SAP reverse engineering metadata browser. I then created the interface and on executing this operation fails on task/Session 13 - Loding - Srcset0 - load data into a staging. I use a shared directory. I put FTP_TRANSFER_METHOD = FSMOUNT_DIRECT. I get the error message is

    org.apache.bsf.BSFException: exception of Jython:
    Traceback (most recent call changed):
    File '< string >", line 14, in < module >
    Load error: see /home/dwsap/ZODI_13001_11001_GLOBAL.log for more details

    to org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    to com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
    to com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
    to com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
    to oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
    to oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
    to oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    to com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
    to com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
    to com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
    to com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
    to com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)
    to oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)
    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)
    to oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
    to java.lang.Thread.run(Thread.java:744)
    Caused by: Traceback (most recent call changed):
    File '< string >", line 14, in < module >
    Load error: see /home/dwsap/ZODI_13001_11001_GLOBAL.log for more details

    to org.python.core.PyException.doRaise(PyException.java:219)
    to org.python.core.Py.makeException(Py.java:1166)
    to org.python.core.Py.makeException(Py.java:1170)
    to org.python.pycode._pyx0.f$ 0 (< string >: 50)

    to org.python.pycode._pyx0.call_function (< string >)
    to org.python.core.PyTableCode.call(PyTableCode.java:165)
    to org.python.core.PyCode.call(PyCode.java:18)
    to org.python.core.Py.runCode(Py.java:1204)
    to org.python.core.Py.exec(Py.java:1248)
    to org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
    to org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         ... 19 more


    I checked the log file and it contains the following


    $ ZODI_13001_11001_GLOBAL.log more

    SQL * Loader: release 11.2.0.4.0 - Production on Thu Mar 27 11:19:17 2014

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    SQL * Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12504: TNS:listener did not have the SERVICE_NAME in CONNECT_DATA


    I checked my tnsnames.ora and it seems to be OK


    tnsnames.ora # Network Configuration file: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.

    XXXXXX =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxx) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = xxxxxx)
    (SID = xxxxxx)
    (GLOBAL_NAME = xxxxxx)
    )
    )


    Here's my listener.ora


    listener.ora # Network Configuration file: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxx) (PORT = 1521))
    )
    )
    ADR_BASE_LISTENER = / u01/app/oracle



    What could be the problem?

    Concerning

    Thanks a lot for your help. The problem is that I had put in the incorrect name of the instance.

  • Extract data from budget of Ebs use native adapter in FDMEE

    Hi team,

    Please tell us how can I get budget data of Ebs with native adapter. Is it possible, as we can learn real separately and budget separately and categorize. Also it stating that we are pulling real from table GL balances. Please advise has friends.

    Kind regards

    Mouline

    Hello

    When you create a rule to load data, you can set the type of balance source as a filter. This can be real, Budget or load

    Therefore, you may have different DLRs, a Budget and one for actual expenditures. DLRs are defined by category FDMEE, so that you can assign each of the DLR to your categories (Ex: actual and budgeted)

    Concerning

  • Is this possible in E10 to extract data from traffic source Web site for a subset of pages on a site?

    I know that there are ways to draw search engine data, data of social media and then the site as a whole, but I'm looking for the ability to find data from sources of traffic for a specified page of a site group. Is this possible in Eloqua 10? Thank you

    Hi Melissa,

    I think that's what you're looking for:

    If you run the report Page Navigations of Insight, you can then filter on "Web Page" choose only the subset of pages on which you are interested to report. The report will then show you all the previous pages (traffic sources) that were visited before visiting an of these subset of pages. The only downside is that it shows it as a 1:1, it will show all the previous pages for Page A, all the previous pages for Page B, etc. - so you can see the same previous page on the list several times. You can export to Excel, however, and twist a little bit for us hopefully get final report wanted.

    Hope that helps!

    Kim

  • extract data from XMLType using vbscript on OleDB?

    Hello.

    We have a problem where the XMLType column data to get in 11.2.0.1 on Windows x 64 worked very well, but we have moved to 11.2.0.3 Patch 21 and the column type changed to binary storage default, and we started to do read errors when the data was greater than 32 k (or so it seems).

    I opened a SR, and Oracle support sent me a VB script to test playback of the table on OleDB.  However, their script doesn't seem to work as announced, so after a lot of gooling, came to us with the following to read a column of xmltype - not the same table, just to test that the vbscript works:

    REM need to re-register the dll OLEDB as there is a problem with the oracle client and the dll registration

    REM start following an administrator command prompt

    REM regsvr32.exe c:\Users\finite9\oracle\product\11.2.0\client_2\bin\oraoledb11.dll

    the con value = createobject ("adodb.connection")

    con. Open "provider = oraoledb.oracle; user id = finite9; password = password1; data source = TSTDB ".

    Set rs = createobject ("adodb.recordset")

    RS. Open 'select SW_REPLY changedate', con

    While not on the place. EXPRESSIONS OF FOLKLORE

    MsgBox rs. Fields ("ChangeDate"). Value

    RS. MoveNext

    Wend

    RS. Close

    Set rs = nothing

    con. Close

    the value con = nothing

    This works perfectly and displays 12 rows in this column in a vbscript dialog box, but I am not able to do to extract the XMLType column clob data.  I try with for example. RS. Open 'select REPLYDATA.getclobval () from SW_REPLY', stupid but just get errors.

    Is it possible to extract data from XMLType on OleDB with vbscript?  It cannot be OleDB itself which poses problem, because it has worked in our application and 11.2.0.1 although with < 32 k of data.  But it would be nice to have a working test case while we were able to test out our app.  If it is with vbscript or c# is irrelevant.

    ignore the message, it is possible.  Support of Oracle gave me this:

    the con value = createobject ("adodb.connection")

    con. Open "provider = oraoledb.oracle; user id = finite9; password = password1; data source = DEVTST ".

    Set rs = createobject ("adodb.recordset")

    RS. Open "select t.REPLYDATA.getclobval () as xmltestdata OF SW_REPLY t", con

    While not on the place. EXPRESSIONS OF FOLKLORE

    MsgBox rs. Fields ("xmltestdata"). Value

    RS. MoveNext

    Wend

    RS. Close

    Set rs = nothing

    con. Close

    the value con = nothing

    but there is a problem when xmldata exceeds a certain size.  small starters work well if.

  • Extract data from error HFM, float to Numeric?

    Hi all

    We extract data from HFM,.

    HFM-> SQL-> FILE staging

    Our mapping, flow, everything seems fine. When we run this out on the third market errors while extracting data with the following:

    com.hyperion.odi.common.ODIHAppException: arithmetic overflow error conversion float type numeric data.


    We researched and found to increase the logical length should solve this problem.

    Our Source has a length of 16...

    We have increased the logical length of target from 16 to 30, and he rest-error. We even tried 50, 100 for the logical length.

    We are at Version 10.1.3.6.0.

    Any suggestions on how to fix this?

    Thank you!

    Published by: user10678366 on May 22, 2013 13:28

    Have you tried changing the scale of all the columns float, right?

    It can be a ridiculously large number coming from HFM. So, go to store for your data source in ODI and manually change the data type of column type VARCHAR of size like 100 or more. That would force the ODI to create the staging table with columns of characters for the field. Data will be retrieved anyway. Given that you write it in file, type of character should not matter. In addition, if writing to the file fails for any reason, you can do a max on the staging table and find the value problem in the table (while in HFM, you may not be able to do).

  • Extract data from the table on hourly basis

    Hello

    I have a table that has two columns date all the hours of the base and the response time. I want to extract data from the date corresponding previous hourly basis with the response time. The data will be loaded into the table every midnight.

    for example: today date 23/10/2012
    I want to extract data from 22/10/12 00 to the 22/10/12 23

    The sub query pulls the date as demanded, but I'm not able to take the time to answer.

    with one also
    (select min (trunc (lhour)) as mindate, max (trunc (lhour)) as AVG_HR maxdate)
    SELECT to_char (maxdate + (level/25), "dd/mm/yyyy hh24") as a LEVEL CONNECTION dates < = * (1) 24;

    Please help me on this.

    Try this

    SELECT * FROM table_nm
     WHERE to_char(hour,'DD') = to_char(SYSDATE-1,'DD')
    
  • Extract data from Oracle into excel file

    Hello

    I have a requirement where in I need to extract data from Oracle into excel file and the worksheet excel name should be 'given '.
    for example. Excel 'AR Data_DDMMYY' file name and the name of the "Data" sheet excel

    I used the UTL_FILE API to extract the data delimited by tabs that you can open in excel, but it's not exactly an excel file as the name of the worksheet is the same as the name of the file.

    I tried to use utl_file.fcopy and frename.

    Is it possible to do it using PLSQL?

    Select * from version of v$.
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    "CORE     10.2.0.5.0     Production"
    TNS for HPUX: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Example Code:
    declare
    cursor c is
    select * from scott.emp;
    v varchar2(100);
    f utl_file.file_type;
    
    file_name varchar2(100) := 'AR Data.xls';
    dir varchar2(50) := 'CESDIR191710';
    
    --select * from dba_directories
    
    begin
    
    
    f := utl_file.fopen(dir, file_name, 'W');
    
    v := 'EMPNO'||chr(9)||'ENAME'||chr(9)||'JOB'||chr(9)||'SAL'||chr(9)||'HIREDATE'||chr(9)||'DEPTNO';
    utl_file.put_line(f, v);
    
    for i in c
    loop
    
    v := i.empno||chr(9)||i.ename||chr(9)||i.job||chr(9)||i.sal||chr(9)||i.hiredate||chr(9)||i.deptno;
    utl_file.put_line(f, v);
    
    end loop;
    utl_file.fclose(f);
    
    --utl_file.frename(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls', false);
    utl_file.fcopy(dir, file_name, dir, replace(file_name, '.xls', '_')||to_char(sysdate, 'MMDDYY')||'.xls');
    
    end;
    Thank you
    Imran

    Hello

    I tried to change the .xlsx to .xls and it gives a note at the opening of the file "the file you are trying to open, abc.xls, is in a different format that it is specified by the file extension. Check that the file is not corrupted and precedes from a trusted source before you open the file. Do you want to open it now? »

    When you rename the file does not solve your problem.
    Anton Scheffer package generates a file in format xlsx Office 2010. When rename you it with the .xls extension, then Office 2010 will give you the warning that the file format does not match the extension.

    but the requirement has to generate excel 2003 file.

    The xml_spreadsheet package writes a format that was introduced with Office 2003, but you must use .xml as extension in other Office 2010 will give you the same caveat.
    To write the real xls version (binary), you can use Apache POI. You will need to import Java classes in your db and write a PL/SQL wrapper. Or you can use one of the options above, writing the output to a windows server and then use Excel to open and save in the required format.

    You must decide whether it is easier to write the binary xls format or to convince the customer to accept other formats that can be opened with Excel.

    Concerning
    Marcus

  • Extract data from an xml file takes almost an hour to 2.5 M data.

    Hello

    Any help would be much appreciated. Extract data from an xml file takes almost an hour to 2.5 M. data is there a solution to this.

    WITH t AS
    (SELECT XMLTYPE (response) pass FROM dual
    )
    SELECT
    b.entity_id,
    c.INSTANCE_ID,
    d.attribute_id,
    d.DATA_TYPE,
    d.ATTRIBUTE_VALUE,
    d.outcome_style
    T,.
    XMLTABLE (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
    'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
    , ' SOAP - ENV:Envelope / SOAP - ENV:Body / typ: assess-response/typ: global instance / typ:entity'
    PASSAGE t.col
    Path of COLUMNS entity_id VARCHAR2 (256) "@id".
    path XMLTYPE res_tmp2 'typ:instance') b
    xmltable (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
    'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
    , "typ:instance".
    PASSAGE b.res_tmp2
    Path of COLUMNS instance_id VARCHAR2 (256) "@id".
    path XMLTYPE res_tmp3 'typ:attribute') c
    xmltable (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
    'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
    , "typ:attribute".
    PASSAGE c.res_tmp3
    Path of VARCHAR2 (256) COLUMNS attribute_id '@id '.
    , data_type VARCHAR2 (256) path '@type '.
    , attribute_value VARCHAR2 (256) path '.'
    path VARCHAR2 (256) outcome_style '@inferred') d;

    Thank you
    Mhand

    OK, in this case the best option is to store the answer in a binary table of XMLType (may be a temporary table if you want to) and run the query from there:

    CREATE TABLE tmp_xml OF XMLType
    XMLType STORE AS SECUREFILE BINARY XML -- default storage in your version
    ;
    
    INSERT INTO tmp_xml VALUES(XMLType(response));
    
    SELECT b.entity_id,
           c.instance_id,
           d.attribute_id,
           d.data_type,
           d.attribute_value,
           d.outcome_style
    FROM tmp_xml t,
         XMLTABLE(
           XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV"
                        , 'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS "typ")
         , 'SOAP-ENV:Envelope/SOAP-ENV:Body/typ:assess-response/typ:global-instance/typ:entity'
           PASSING t.object_value
           COLUMNS
    ...
    
  • wanted to extract data from nested table pl/sql Ref Cursor getting an erro

    create or replace type 'DEPT12' as an object (dno number (2), dname varchar2 (30), varchar2 (50)) loc;

    create or replace type dept_tab in the table in "DEPT12".

    create or replace type 'LOC12' as an object (locno number, loc_name varchar2 (100))

    create or replace type loc_tab in the table of "LOC12.

    create or replace type dept_loc_rec1 as an object (dept_tab, eno number, loc_dt loc_tab dept_dt);

    Create type dept_loc_tb as table of the dept_loc_rec1

    create table dept_loc_tb_bk1 (dept_dt dept_tab, eno number, loc_dt loc_tab)
    NESTED TABLE dept_dt
    STORE AS dept_tab12,
    NESTED TABLE loc_dt
    STORE AS loc_tab12




    insert into dept_loc_tb_bk1 values (dept_tab (dept12(3,'ABD','LOC')
    dept12(4,'ABD','LOC')
    (, dept12(5,'ABD','LOC')), 3, loc_tab (loc12(21,'AAB'),
    loc12(22,'AAB'),
    loc12(23,'AAB')));

    When I try to extract data from Ref cursor to pl/sql table that I get an error ora-06504: pl/sql: return types of the result set of variables or request do not match.
    I created a table nested, as well as the pl/sql nested table object dept_loc_tb and I said the same dept_loc_tb lv_dept_loc_tb, but trying to get in this variable we get an error above.

    Please anyone can solve my problem.
    -----------------
    declare
    type cr is ref cursor;
    cr_obj cr;

    lv_dept_loc_tb dept_loc_tb;

    Start
    Open cr_obj to select dept_dt, eno, dept_loc_tb_bk1 loc_dt;
    collect the fetch cr_obj in bulk in lv_dept_loc_tb;
    close cr_obj;
    end;

    Your query selects 3 distinct columns requires so 3 collections of matching types. You want to treat these 3 columns as an object of type DEPT_LOC_REC1:

    SQL> declare
      2  type cr is ref cursor;
      3  cr_obj cr;
      4
      5  lv_dept_loc_tb dept_loc_tb;
      6
      7  begin
      8  open cr_obj for select dept_dt,eno,loc_dt from dept_loc_tb_bk1;
      9  fetch cr_obj bulk collect into lv_dept_loc_tb;
     10  close cr_obj;
     11  end;
     12  /
    declare
    *
    ERROR at line 1:
    ORA-06504: PL/SQL: Return types of Result Set variables or query do not match
    ORA-06512: at line 9
    
    SQL> declare
      2  type cr is ref cursor;
      3  cr_obj cr;
      4
      5  lv_dept_loc_tb dept_loc_tb;
      6
      7  begin
      8  open cr_obj for select DEPT_LOC_REC1(dept_dt,eno,loc_dt) from dept_loc_tb_bk1;
      9  fetch cr_obj bulk collect into lv_dept_loc_tb;
     10  close cr_obj;
     11  end;
     12  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.
    P.S. discover sys_refcursor.

  • Extract data from database using php script and entry for datagrid.

    Hi all

    I intend to use the php script below to extract data from a database.

    I want to then display it in a datagrid control, the datagrid control has Ref columns job, the company and the position.

    The php script I have is

    <? PHP
    $hostname_conn = "localhost";
    $username_conn = "";
    $password_conn = "";

    $conn = mysql_connect ($hostname_conn, $username_conn, $password_conn);

    @mysql_select_db ("videochat");

    $query = "SELECT * FROM work."

    $result = mysql_query ($query);

    $row = mysql_fetch_array ($result);

    $ref = $row ["jobref"];
    $company = $row ['company'];
    $position = $row ["position"];

    echo "< Ref > $ref < / Ref >";
    echo "< company > $company < / company > ';
    echo "< location > $position < / location >."

    ? >

    Could someone show me how I chuck this data in a grid?

    Thank you

    Hello

    You should start using the authority, either zendamf which is used by the data wizards in flashbuilder 4 or with amfphp which is probably better than zend but has not all nicities such as the creation of objects of value.

    http://flashhub.NET/filter/

    This project uses amfphp, basically, it uses remoteobjects so returned php is in a ready to put directly into a grid or a datagroup arraycollection collection.

    If you need help with this sort of thing PM me and I can do a login session...

    the PHP services for calls used in the application

    <>

    class pets

    {

    var $db_host = "localhost";

    var $db_name = "flashhub_pets";

    var $db_user = "flashhub_david";

    var $db_pwd = "david";

    function pets()

    {

    Define the methodTable for this class in the constructor

    $this-> methodTable = array)

    "getPets"-online (table)

    'description' => 'Pets, database',

    'access' => 'remote '.

    )

    );

    }

    function getAllPets()

    {

    $mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;

    @mysql_select_db ($this-> db_name);

    $Query = "SELECT * from pet;

    $Result = mysql_query ($Query);

    return ($Result);

    }

    function getTypeOfPets ($category)

    {

    $mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;

    @mysql_select_db ($this-> db_name);

    $Query = "SELECT * from pet where CATEGORY = $category;

    $Result = mysql_query ($Query);

    return ($Result);

    }

    function getCategories()

    {

    $mysql = mysql_connect ($this-> $this-> db_user, db_host), $this-> db_pwd;

    @mysql_select_db ($this-> db_name);

    $Query = "SELECT * from category";

    $Result = mysql_query ($Query);

    return ($Result);

    }

    }

    ?>

    David

  • Script Insert statement to extract data from Table in Oracle 7i

    Hi all, I have an old Oracle legacy system that works for more than 15 years. Every now and then, we need to extract data from this table @ ORacle 7i to import to Oracle 10 G.

    My thoughts are to create a script to Insert statements in oracle 7 and that, to be deployed to Oracle 10 G.

    I found cela scripts in Google and don't know exactly how it works. No explanation on these scripts, would be greatly appreciated. I find that this format can help to produce a set of insert statements in this table to the last table to 10G.

    < pre >
    -Step 1: create this procedure:
    create or replace function ExtractData (v_table_name varchar2) return varchar2 as
    Boolean b_found: = false;
    v_tempa varchar2 (8000);
    v_tempb varchar2 (8000);
    v_tempc VARCHAR2 (255);
    Start
    for tab_rec in (select table_name from user_tables where table_name = upper (v_table_name))
    loop
    b_found: = true;
    v_tempa: =' select ' insert into ' | tab_rec.table_name |' (';
    for col_rec in (select * from user_tab_columns)
    where
    table_name = tab_rec.table_name
    order by
    column_id)
    loop
    If col_rec.column_id = 1 then
    v_tempa: = v_tempa | " ' || Chr (10) | " ' ;
    on the other
    v_tempa: = v_tempa |', ". Chr (10) | " ' ;
    v_tempb: = v_tempb |', ". Chr (10) | " ' ;
    end if;
    v_tempa: = v_tempa | col_rec.column_name;
    If instr(col_rec.data_type,'CHAR') > 0 then
    v_tempc: = "' |' | col_rec.column_name |'| " ' ;
    elsif instr (col_rec.data_type, 'DATE') > 0 then
    v_tempc: = "' to_date ("'| to_char('|| col_rec.column_name||',''mm/DD/YYYY HH24 '') | ") (', "' dd/mm/yyyy hh24"') "';
    on the other
    v_tempc: = col_rec.column_name;
    end if;
    v_tempb: = v_tempb | " ' || Decode('|| col_rec.column_name||',''Null'','||v_tempc||') | " ' ;
    end loop;
    v_tempa: = v_tempa |') values ('| v_tempb |'); "from ' |" tab_rec.table_name | « ; » ;
    end loop;
    If not b_found then
    v_tempa: ='-Table ' | v_table_name | 'not found ';
    on the other
    v_tempa: = v_tempa | Chr (10) | "select"-commit; "double;';
    end if;
    Return v_tempa;
    end;
    /
    display errors

    -STEP 2: run the following code to extract the data.
    Go head
    set pages 0
    game of stripes on
    fixed lines 2000
    the feeding off value
    trigger the echo
    var retline varchar2 (4000)
    coil c:\t1.sql
    Select 'set echo off' from dual;
    Select 'spool c:\recreatedata.sql' from dual;
    Select ' select "-these data was extracted on" | TO_CHAR (sysdate, "mm/dd/yyyy hh24" ") double;' double.

    -The following two lines as repeat as many times as the tables that you want to extract
    exec: retline: = ExtractData ('dept');
    print: retline;

    exec: retline: = ExtractData ('emp');
    print: retline;

    Select 'off spool' from dual;
    spool off
    @c:\t1

    -Step 3: run the updated c:\recreatedata.sql waiting for output to recreate the data.

    Source: http://www.idevelopment.info/data/Oracle/DBA_tips/PL_SQL/PLSQL_5.shtml




    < / pre >

    Hello

    Well what this script do.
    You will pass a table name as input to the function that will return varchar2 (string - insert statement). It will generate 2 t1.sql of sql script that contains the output sequence.

    Will use the first passed the user_tables scipt to check if the input table name exists and if there is the will reterive user_table_columns column names and generate the following sql script.
    Now, this t1.sql will run to generate a final sript formally orders insert that will run you on the target schema (make sure that the table exists).

    * #t1.sql*

    set echo off
    spool recreatedata.sql
    select '-- This data was extracted on '||to_char(sysdate,'mm/dd/yyyy hh24:mi') from dual;
    select 'insert into MY_OBJECT1 ('||chr(10)||'OWNER,'||chr(10)||'TOTAL) values ('||decode(OWNER,Null,'Null',''''||OWNER||'''')||','||chr(10)||''||decode(TOTAL,Null,'Null',TOTAL)||');' from MY_OBJECT1;
    select '-- commit;' from dual;
    spool off
    

    Then @t1.sql runs, and the general insert for the infeed table table.

    -- This data was extracted on 03/09/2009 23:39
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('MDSYS', 92800);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('TSMSYS', 256);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('DMSYS', 15104);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('TESTME', 128);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('PUBLIC', 2571392);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('OUTLN', 768);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('CTXSYS', 21888);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('OLAPSYS', 78336);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('KLONDIKE', 2432);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('SYSTEM', 51328);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('EXFSYS', 21504);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('DBSNMP', 4096);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('ORDSYS', 216192);
    
    INSERT INTO MY_OBJECT1 (OWNER, TOTAL)
      VALUES   ('SYSMAN', 111744);
    
    -- commit;
    

    Hope this helps
    Concerning

  • 1074118649 error occurred at niUSRP extract data from Rx (2D CBD) .vi

    Hello

    When I was trying the example of the USRP OR which is "niUSRP EX Rx synchronized to multiple entries (MIMO Expansion)", a mistake is released which is

    1074118649 error occurred at niUSRP extract data from Rx (2D CBD) .vi

    A workflow command has been issued in the past.

    can anyboay help me solve the problem?

    Thank you very much

    Andy

    Hi andy,.

    what you need to do is reversing the Oder river where the screw niUSRP the value Time.vi and niUSRP Trigger.vi configure a1.1ppear. Time of first setting then set up trigger. The example works correctly with version 1.1, since you are using version 1.2, that changes must be made.

    In the example, you can set the clock to standard time (start time = 0) even if you had already triggered the reception. Thus, samples received will be acquired with time stamp later where the error.

    Best regards

Maybe you are looking for

  • Add find my friends

    I know that I can access the above through iCloud but would like to be able to save the icon or widget to my home screen. I managed to find my phone, but can't remember how! Any help much appreciated.

  • Why keep iPhoto quit unexpectedly?

    Anyone having problems opening iPhoto?  I open it, but then it closes unexpectedly and gives me a window asking if I want to go to Apple or to re - open.  I send the report, then try to re - open dock, as I usually do, and it doesn't open at all.  Al

  • Define a VI to run when starting on the myRIO when programmed in scan mode

    Salvation of the forums, Hoping you can help me with this please. Of course there must be a simple way for me to do, but can't seem to find anything through research on the main site of NOR... I work with the platform myRIO and simply want a VI to ru

  • Password reset BIOS HP Pavilion dv4 4172la

    I forgot the bios password and I need to get into the bios menu to change some configurationsmy laptop is a HP Pavilion dv4 4172lathe OS is windows 7 64the code appeared is: 62023458 someone knows how can I reset the password?

  • application of the bootstrapper does not respond for dinner dash hometown hero

    For me, my husband bought a laptop for Christmas and we have installed the Pack part of Diner Dash.  I played very well until today.  I can click on the shortcut on my desktop and get to the point where I type my password.  I hit enter and cannot go