How to transform data while populating an external table

Hi Folks,
I have to populate the first four fields of my external table from the data in a csv file. While the last field should have the "SYSDATE". My code to create an external table (and to populate the first four fields) is as follows
create table T_XT
(PNODE VARCHAR2(10),
NODE VARCHAR2(15),
SUB_NODE VARCHAR2(12),
NODE_COUNT NUMBER,
CREATE_DATE DATE
organization external
(type oracle_loader
default DIRECTORY topology
access parameters
(records delimited by NEWLINE
characterset US7ASCII
badfile 'TOPOLOGY':'Modem_Count.bad'
discardfile 'TOPOLOGY':'Modem_Count.dis'
logfile 'TOPOLOGY':'Modem_Count.log'
fields terminated by ','
optionally enclosed by "'"
location ('Modem_Count.csv')
reject limit unlimited parallel;
Can somebody please let me know where this data transformation (for the last field) should be specified ? And the syntax to do so.
Thanks in advance
rogers42

Hi,
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6790030213850#59876418675556
You'd rather just:
select pnode,
       node,
       sub_node,
       node_count,
       sysdate
from   t_xt;

Similar Messages

  • How to copy data from mac to external hard

    how to copy data from mac to external hard

    ok - since you'll be sharing it with a PC - connect it to your windows pc - then format from there - instead of NTFS format - choose exFAT.
    or, you can read the link below on how to do it in dos mode.
    http://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-can-i-forma t-external-drive-in-exfat-not-in/0f6bf19a-19d6-4470-ae05-53ddf26bb476?msgId=1860 eae3-3488-4eea-8326-f87b89d9851b
    once you've formatted it - you can now use it in both your macbook and windows computer.

  • How to select date while Updating record

    I Have created Validation through user api hook on Performance Management Module.but when user enter objective ,if is greater then or less then hundred then system raise error as per policy,but when user enter another objective to meet 100 percent then system raise error "hr object lock " because i am using select statement to sum of that object ,any body idea how to select date while inserting or updating any record.
    Thansks.

    Hi,
    drag and drop a af:convertDateTime on top of the select inputDate component
    <h:form>
    <af:selectInputDate label="Label 1">
    <af:convertDateTime pattern="yyyy-MM-dd hh:mm"/>
    </af:selectInputDate>
    </h:form>
    This adds the current time to the selected dat. In JDeveloper 11 you will be able to explicitly change the time in the calendar
    Frank

  • How to Pull data from sap r/3 tables to oracle tables

    how to fetch data from sap r/3 tables & data pulled to oracle table .
    GIVE THE APPROPRITE ANSWER FOR THIS.
    THANKS IN ADVANCE.
    If it is useful for me , i am giving point.
    regards ,
    Navita
    Edited by: NAVITA YADAV on Mar 7, 2008 2:07 PM
    Edited by: NAVITA YADAV on Mar 7, 2008 2:08 PM

    You need to perform some native SQL to fetch data. Before doing this connection must be exists b/w your R/3 and Oracle server.
    Basis team will help you to have connection.
    Check the connection name in the table DBCON.
    Check the below code to handle native SQL.
      SELECT SINGLE  DBMS
               FROM  DBCON
               INTO  DBTYPE
               WHERE CON_NAME = DBS.
      IF DBTYPE = 'ORA'.
        TRY.
          EXEC SQL.
            CONNECT TO :dbs
          ENDEXEC.
    ERROR Handling for Native SQL *************
          IF SY-SUBRC <> 0.
            MESSAGE `Docusphere connection failed.` TYPE 'I'.
            EXIT.
          ENDIF.
      EXEC SQL PERFORMING loop_output.
        OPEN C1 FOR
        SELECT  UK1, UK7, uk6, uk9, uk22, uk23, uk25    "field names of Oracle table
        FROM IIS_DOCS_AP10D
        WHERE ( UK2 = 'ZFIINVOICE' OR UK2 = 'ZFIPAYREQ' )    AND
        UK19 = 'E'                                           AND
        UK20 IS NULL
      ENDEXEC.
          DO.
            CLEAR W_OUTPUT.
            EXEC SQL.
              FETCH NEXT C1 into :wa1-arc_doc_id, :wa1-bukrs, :wa1-belnr, :wa1-gjahr, :wa1-wi_id, :wa1-ARCH_METHOD, :wa1-barcd.
            ENDEXEC.
    enddo.
    Reward points if helpful.................

  • JDBC-XI-FILE scenario. How to extract data from more than one table in JDBC

    Hi,
    I was asked a question like in JDBC-XI-FILE scenario........ How to extract data from more than one tables (i.e from JDBC system) ?? What is the logic to do the same ??
    I am not sure whether this is a valid question..........but any help in this regards is highly appreciated.
    Regards
    Kumar

    HI,
    Yes it can be possible ,please see the following links
    JDBC  Receiver with Oracle Stored Procedures
    configuring jdbc adapter with multiple tables
    RFC -> XI -> JDBC Scenario Updating Multiple Tables
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    JDBC Adapter multiple Selects
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=jdbc%20with%20multiple%20tables&cat=sdn_all
    Regards
    Chilla..

  • How to load data to dimensions and fact table is it simialr to sql server

    How to load data to dimensions and fact table in a data ware house environment, is it simialr to sql server, oracle?
    Never migrated or loaded data to datawarehouse server.
    I have an interview and am really confused if they ask anything related to the dataware house side elements.
    Coudl you please if you don't mind provide me some steps and dimension and fact table info, an example only.
    Atleast for my knowledge.
    Thank you very much for the helpful info.

    Some discussions in previous forums should help you
    http://forums.sdn.sap.com/thread.jspa?threadID=2019448
    http://forums.sdn.sap.com/thread.jspa?threadID=1908902
    In the SAP tutorial, you can see a sample example of making fact tables.
    http://help.sap.com/businessobject/product_guides/boexir32SP1/en/xi321_ds_tutorial_en.pdf
    Arun

  • How to insert data from JTable to mysql Table....

    hello everybody
    i need help about how to insert data from JTable to mysql table... i know about how to create Table model...facing problem about how to insert data from JTable to mysql table....any helping link or code ... ill be thankfulll....for giving me solution...

    table1.getValueAt(table1.getSelectedRow(),0)you are getting the value of a selected row... or if you want you can just use a loop..
    for(.....){
    table1.getValueAt(x,y);
    }I think you know INSERT STATEMENT.. here on it just string concat
    sample e.g. (This not insert)
    "delete from accrule " +
                    "where ruleid= " + tblRA.getValueAt(tblRA.getSelectedRow(),0)+
                    " and accountname='"+tblRA.getValueAt(tblRA.getSelectedRow(),1)+"'"

  • How to poll data with DBAdapter using external sequencing table usecase ?

    Hi,
    When I'm polling for data using the 'update external sequencing table on different db' with a dbadapter, I'm getting this error ORABPEL-09903
    My sequencing table is present in another schema. I created the connection pool and data source for the same and provided it as a credential to the adapter when it asked for data source. But my process is not getting deployed. The complete error it's giving is as below :
    [deployProcess] Deploying process E:\Softys\jdev\jdev\mywork\Test\PollExternal\output\bpel_PollExternal_1.0.jar
    BUILD FAILED
    E:\Softys\jdev\jdev\mywork\Test\PollExternal\build.xml:79: A problem occured while connecting to server "ple-jgau.us.oracle.com" using port "7777": bpel_PollExternal_1.0.jar failed to deploy. Exception message is: ORABPEL-09903
    Could not initialize activation agent.
    An error occured while initializing an activation agent for process "PollExternal", revision "1.0".
    Please ensure that the activation agents are configured correctly in the bpel deployment descriptor (bpel.xml).
    oracle.tip.adapter.fw.agent.jca.JCAActivationAgent: java.lang.reflect.InvocationTargetException
    at com.collaxa.cube.engine.core.BaseCubeProcess.startAllActivationAgents(BaseCubeProcess.java:370)
    at com.collaxa.cube.engine.deployment.DeploymentManager.activateDefaultRevision(DeploymentManager.java:1577)
    at com.collaxa.cube.engine.deployment.DeploymentManager.setDefaultRevision(DeploymentManager.java:1536)
    at com.collaxa.cube.engine.deployment.DeploymentManager.deployProcess(DeploymentManager.java:886)
    at com.collaxa.cube.engine.deployment.DeploymentManager.deploySuitcase(DeploymentManager.java:728)
    at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.deploySuitcase(BPELDomainManagerBean.java:445)
    at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:646)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at DomainManagerBean_RemoteProxy_4bin6i8.deploySuitcase(Unknown Source)
    at com.oracle.bpel.client.BPELDomainHandle.deploySuitcase(BPELDomainHandle.java:319)
    at com.oracle.bpel.client.BPELDomainHandle.deployProcess(BPELDomainHandle.java:341)
    at deployHttpClientProcess.jspService(_deployHttpClientProcess.java:376)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    Total time: 20 seconds
    Any help regarding this would be highly appreciated.Please provide me with any link to the documentation for DBAdapters,Polling and its different Usecases.
    Thanks,
    Bhavya

    Hi there,
    this exception just mentions that the process failed to deploy, but it does not explain why. Could you look at the bpel logs, and find the complete exception stack trace with linked exceptions?
    This is a common trouble shooting problem as the process deployer doesn't show the linked exception. Please look at the best practices guide:
    http://download.oracle.com/technology/tech/soa/soa_best_practices_1013x_drop3.pdf
    Under DBAdapter there is a section on how to troubleshoot the adapter. Search for "Find the Root Exception". It is on Page 130.
    Thanks
    Steve

  • How to download data from a an external hard drive ?j

    How to download data from an external hd ?

    You need to copy the data onto your computer and transfer it via that (either via iTunes, or if the app that you want to transfer the data to supports, via wifi). Like the previous reply said, you can't do it directly without a computer being involved.

  • Data Mismatch while selecting from External Table

    Hi I am not able create an external table,I am trying to create and test table and able to create but when i selecting the data it showing data mismatch.I tried for an test data but it returned error.I want to load from an excel file saved as test.csv
    CREATE TABLE Per_ext
    CITY VARCHAR2(30),
    STATE VARCHAR2(20),
    ZIP VARCHAR2(10),
    COUNTRY VARCHAR2(30)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY dataload
    ACCESS PARAMETERS
    MISSING FIELD VALUES ARE NULL
    LOCATION ('test.csv')
    REJECT LIMIT UNLIMITED;
    test.csv file contents
    city ----------     state---------Zip------------country
    Bombay-----     MH------------34324-------india
    london-------London------1321---------UK
    Pune---------MH------------3224---------india
    Banglore----     Karnataka---11313-------india
    rgds
    soumya

    Hi Justin
    I am getting following error when i trying from toad
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "comma": expecting one of: "badfile, byteordermark, characterset, column, data, delimited, discardfile, exit, fields, fixed, load, logfile, language, nodiscardfile, nobadfile, nologfile, date_cache, processing, readsize, string, skip, territory, variable"
    KUP-01007: at line 1 column 29
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    rgds
    soumya

  • How and When Sub-Ledger Data is populated into XLA_DISTRIBUTION_LINKS Table

    Hello Gurus
    I have been working on a Sub-Ledger Accounting and I could get a fair idea of how data is being transferred from XLA_DISTRIBUTION_LINKS to XLA_AE_LINES and XLA_AE_HEADERS. As per my understanding, During "Create Accounting" process, data from XLA_DISTRIBUTION_LINKS will be summed up based on JOUNRAL_LINE_TYPES rules and conditions to load into XLA_AE_LINES and XLA_AE_HEADERS. Then during "Transfer to GL" process, data from XLA_AE_LINES and XLA_AE_HEADERS is transferred to GL Tables. What I didn't understand is how and When data gets loaded into XLA_DISTRIBUTION_LINKS. What are the rules and conditions and during which step data will be loaded to XLA_DISTRIBUTION_LINKS table? Can somebody please explain me how data is transferred from Sub-Ledger Distribution Tables to SLA Distribution Table?
    Thanks,
    Sunny.

    Above Notes are good.
    But I just wanted to add a staight point.
    xla_distribution_links and xla_ae_lines will get populated at the same time.
    Both goes on JLTs and their conditions. One is detailed and the other is summarized / merged.
    xla_ae_lines will have extra balancing lines and xla_distirbution_links will have extra gain / loss lines, which end up with zero amount.
    Also check the links for the setup of distribution identifiers.
    http://docs.oracle.com/cd/E18727_01/doc.121/e13420/T193592sdextchap.htm#sdextacattg
    http://docs.oracle.com/cd/E18727_01/doc.121/e13420/T193592sdextchap.htm#sdextdisidg
    By
    Vamsi

  • How service render date gets populated ?

    Hi
    I am looking for the logic by which FBUDA (structure RV60A) i.e. service render date is getting populated when we are using vf04 and we are not inputting the service render date in the parameters?
    Thanks in advance
    Shubhankar Rai

    Hi Yadav,
    My requirement is to put the billing date in service render date
    I.e. in my scenario the Actual GI date is populating into billing date and also in service render date (komk-fbuda)
    If we enter billing date manually while creating the billing that should be reflect in service render date, in condition level.
    Here it is not happening, it is taking the Actual GI date in service render date,
    Here VBRP-FBUDA is different form komk-fbuda.
    Vbrp-fbuda is have to reflect form Actual GI date only
    My requirement is, I need to populate the billing date into service render date for some conditions only. These conditions are rebate type conditions.
    I can populate the billing date to all conditions not for particular conditions
    In user exit userexit_pricing_prepare_tkomk
    I can move the vbrk-fkdat to tkomk-fbuda
    But this not my requirement
    I need to populate the billing date to service render date to some conditions types only
    In this exit I canu2019t restrict the conditions, I mean in this routine I am not able to select the condition types
    Please advice me where can I write the code to achieve my functionality
    Thanks in Advance
    Jaya.G

  • How data is populated in EUL5_QPP_STATS table?

    there are  few reports that are run monthly and the records of executed Discoverer reports were stored in EUL5_QPP_STATS table. But the information stopped getting recorded in this table from april 2014. Can anyone tell me how data is inserted in this table and whats is the cause of this issue.

    Hi
    Can anyone Please answer to my question

  • How to transformed data from File to DB but the data to be insert two tables  parallel?

    Hi friends ,I am new to Oracle SOA ,I have one requirement  for the project
    actually in these project
    1.I have to read three different types of files (Employee info,Purchase Order Info,Salaes Order Info) through file adapter these records are to be store in  data base 
    transaction table.In these transaction table contains WHO columns and payload  with clob data type which contains each  record  in xml form.
    2. Now I have to  take these payload data  which is in xml form and store   in the respective table(employee or PO or SO) .I have to call these in dynamically.
    so please give me ideas and suggesstions ,,
    thanks in advance

    Roger,
    I don't know about simple way to load data from file into a table using button from your application,
    Maybe some piece of PL/SQL code with UTL_FILE or DBMS_LOB, or you can try to upload file to database using Apex "File browse" item, and then do some processing with DBMS_LOB... but it will require some work...
    Maybe someone else could advice with some simple method I don't know...
    However loading files using Apex Load Utility is quite easy.
    You can use something like this to load data to views created on remote tables:
    CREATE TABLE local_tmp_table AS SELECT * FROM view_on_remote_table WHERE 1=0;
    --load data from file to created table using Apex Load utility
    INSERT INTO view_on_remote_table SELECT * FROM local_tmp_table;
    COMMIT;
    DROP local_tmp_table;Or without views:
    CREATE TABLE local_tmp_table AS SELECT * FROM remote_table@dblink WHERE 1=0;
    --load data from file to created table using Apex Load utility
    INSERT INTO remote_table@dblink SELECT * FROM local_tmp_table;
    DROP local_tmp_table;Regards
    Tomasz
    Message was edited by:
    Tomasz K.

  • While loading through External Tables, Japanese characters wrong load

    Hi all,
    I am loading a text file through External Tables. While loading, japanese characters are loading as junk characters. In text file, the characters are showing correctly.
    My spool file
    SET ECHO OFF
    SET VERIFY OFF
    SET Heading OFF
    SET LINESIZE 600
    SET NEWPAGE NONE
    SET PAGESIZE 100
    SET feed off
    set trimspool on
    spool c:\SYS_LOC_LOGIC.txt
    select CAR_MODEL_CD||',' || MAKER_CODE||',' || CAR_MODEL_NAME_CD||',' || TYPE_SPECIFY_NO||',' ||
         CATEGORY_CLASS_NO||',' || SPECIFICATION||',' || DOOR_NUMBER||',' || RECOGNITION_TYPE||',' ||
         TO_CHAR(SALES_START,'YYYY-MM-DD') ||',' || TO_CHAR(SALES_END,'YYYY-MM-DD') ||',' || LOGIC||',' || LOGIC_DESCRIPTION
    from Table where rownum < 100;
    spool off
    My External table load script
    CREATE TABLE SYS_LOC_LOGIC
         CAR_MODEL_CD                         NUMBER               ,
         MAKER_CODE                              NUMBER,
         CAR_MODEL_NAME_CD                    NUMBER,
         TYPE_SPECIFY_NO                         NUMBER               ,
         CATEGORY_CLASS_NO                    NUMBER               ,
         SPECIFICATION                         VARCHAR2(300),
         DOOR_NUMBER                              NUMBER,
         RECOGNITION_TYPE                    VARCHAR2(30),
         SALES_START                          DATE ,
         SALES_END                               DATE ,
         LOGIC                                   NUMBER,
         LOGIC_DESCRIPTION                    VARCHAR2(100)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY XMLTEST1
    ACCESS PARAMETERS
    RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY ','
    MISSING FIELD VALUES ARE NULL
                        CAR_MODEL_CD,MAKER_CODE,CAR_MODEL_NAME_CD,TYPE_SPECIFY_NO,
                        CATEGORY_CLASS_NO,SPECIFICATION,DOOR_NUMBER,RECOGNITION_TYPE,
                        SALES_START date 'yyyy-mm-dd', SALES_END      date 'yyyy-mm-dd',
                        LOGIC, LOGIC_DESCRIPTION     
    LOCATION ('SYS_LOC_LOGIC.txt')
    --location ('products.csv')
    REJECT LIMIT UNLIMITED;
    How to solve this.
    Thanks in advance,
    Pal

    Just so I'm clear, user1 connects to the database server and runs the spool to generate a flat file from the database. User2 then uses that flat file to load that data back in to the same database? If the data isn't going anywhere, I assume there is a good reason to jump through all these unload and reload hoops rather than just moving the data from one table to another...
    What is the NLS_LANG set in the client's environment when the spool is generated? Note that the NLS_CHARACTERSET is a database setting, not a client setting.
    What character set is the text file? Are you certain that the text file is UTF-8 encoded? And not encoded using the operating system's local code page (assuming the operating system is capable of displaying Japanese text)
    There is a CHARACTERSET parameter for the external table definition, but that should default to the character set of the database.
    Justin

Maybe you are looking for