How to reject external table rows with some blank columns

How to reject external table rows with some blank columns
I have an external table and I would like to reject rows when a number of fields are empty. Here are the details.
CREATE TABLE EXTTAB (
ID NUMBER(10),
TSTAMP DATE,
C1 NUMBER(5,0),
C2 DATE,
C3 FLOAT(126)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_DAT_DIR
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
LOAD WHEN (NOT (c1 = BLANKS AND c2 = BLANKS AND c3 = BLANKS))
LOGFILE EXT_LOG_DIR:'exttab.log'
BADFILE EXT_BAD_DIR:'exttab.bad'
DISCARDFILE EXT_BAD_DIR:'exttab.dsc'
FIELDS TERMINATED BY "|"
LRTRIM
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL
FIELDS (
ID,
TSTAMP DATE 'YYYYMMDDHH24MISS',
C1,
C2 DATE 'YYYYMMDDHH24MISS',
C3
) LOCATION ('dummy.dat')
REJECT LIMIT UNLIMITED
So, as you can see from the LOAD WHEN clause, I'd like to reject rows when C1, C2 and C3 are empty.
The above statement works fine and creates the table. However when I am trying to load data using it, the following error is produced:
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 "not": expecting one of: "double-quoted-string, identifier, (, number, single-quoted-string"
KUP-01007: at line 1 column 41
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
It seems that external tables driver does not understand the "NOT (...)" condition. Could anyone suggest how I can achieve what I want in a different way?
Thank you.
Denis

Another method would be to simply remove the "LOAD WHEN condition" and create a view on the external table which filters the data.
CREATE EXTTAB_VIEW AS
SELECT * FROM EXTTAB
WHERE not (c1 is null and c2 is null and c3 is null);

Similar Messages

  • How to drop external table together with the linked file

    Hi,
    I am running 10g and using the external table feature to move data between two databases. Now the procedure I am using has to make sure, that on the target db the external tables created on the previous run are not existing.
    As far I know the statement
    DROP TABLE <EXTERNAL TABLE NAME>; does not remove the file.
    How to achieve the goal?
    Thanks!

    Can you use the UTL_FILE.FRemove function to delete the underlying file? That seems like the simplest solution. Assuming, of course, that you have the appropriate privileges to do so.
    Justin
    Of course, I'd generally question why you're using external tables and flat files to move data between databases rather than database links, but I assume you have valid reasons for that...
    Message was edited by:
    Justin Cave

  • How to import external table, which exist in export dump file.

    My export dump file has one external table. While i stated importing into my developement instance , I am getting the error "ORA-00911: invalid character".
    The original definition of the extenal table is as given below
    CREATE TABLE EXT_TABLE_EV02_PRICEMARTDATA
    EGORDERNUMBER VARCHAR2(255 BYTE),
    EGINVOICENUMBER VARCHAR2(255 BYTE),
    EGLINEITEMNUMBER VARCHAR2(255 BYTE),
    EGUID VARCHAR2(255 BYTE),
    EGBRAND VARCHAR2(255 BYTE),
    EGPRODUCTLINE VARCHAR2(255 BYTE),
    EGPRODUCTGROUP VARCHAR2(255 BYTE),
    EGPRODUCTSUBGROUP VARCHAR2(255 BYTE),
    EGMARKETCLASS VARCHAR2(255 BYTE),
    EGSKU VARCHAR2(255 BYTE),
    EGDISCOUNTGROUP VARCHAR2(255 BYTE),
    EGREGION VARCHAR2(255 BYTE),
    EGAREA VARCHAR2(255 BYTE),
    EGSALESREP VARCHAR2(255 BYTE),
    EGDISTRIBUTORCODE VARCHAR2(255 BYTE),
    EGDISTRIBUTOR VARCHAR2(255 BYTE),
    EGECMTIER VARCHAR2(255 BYTE),
    EGECM VARCHAR2(255 BYTE),
    EGSOLATIER VARCHAR2(255 BYTE),
    EGSOLA VARCHAR2(255 BYTE),
    EGTRANSACTIONTYPE VARCHAR2(255 BYTE),
    EGQUOTENUMBER VARCHAR2(255 BYTE),
    EGACCOUNTTYPE VARCHAR2(255 BYTE),
    EGFINANCIALENTITY VARCHAR2(255 BYTE),
    C25 VARCHAR2(255 BYTE),
    EGFINANCIALENTITYCODE VARCHAR2(255 BYTE),
    C27 VARCHAR2(255 BYTE),
    EGBUYINGGROUP VARCHAR2(255 BYTE),
    QTY NUMBER,
    EGTRXDATE DATE,
    EGLISTPRICE NUMBER,
    EGUOM NUMBER,
    EGUNITLISTPRICE NUMBER,
    EGMULTIPLIER NUMBER,
    EGUNITDISCOUNT NUMBER,
    EGCUSTOMERNETPRICE NUMBER,
    EGFREIGHTOUTBOUNDCHARGES NUMBER,
    EGMINIMUMORDERCHARGES NUMBER,
    EGRESTOCKINGCHARGES NUMBER,
    EGINVOICEPRICE NUMBER,
    EGCOMMISSIONS NUMBER,
    EGCASHDISCOUNTS NUMBER,
    EGBUYINGGROUPREBATES NUMBER,
    EGINCENTIVEREBATES NUMBER,
    EGRETURNS NUMBER,
    EGOTHERCREDITS NUMBER,
    EGCOOP NUMBER,
    EGPOCKETPRICE NUMBER,
    EGFREIGHTCOSTS NUMBER,
    EGJOURNALBILLINGCOSTS NUMBER,
    EGMINIMUMORDERCOSTS NUMBER,
    EGORDERENTRYCOSTS NUMBER,
    EGRESTOCKINGCOSTSWAREHOUSE NUMBER,
    EGRETURNSCOSTADMIN NUMBER,
    EGMATERIALCOSTS NUMBER,
    EGLABORCOSTS NUMBER,
    EGOVERHEADCOSTS NUMBER,
    EGPRICEADMINISTRATIONCOSTS NUMBER,
    EGSHORTPAYMENTCOSTS NUMBER,
    EGTERMCOSTS NUMBER,
    EGPOCKETMARGIN NUMBER,
    EGPOCKETMARGINGP NUMBER,
    EGWEIGHTEDAVEMULTIPLIER NUMBER
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EV02_PRICEMARTDATA_CSV_CON
    ACCESS PARAMETERS
    LOCATION (EV02_PRICEMARTDATA_CSV_CON:'VPA.csv')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    While importing , when i seen the log file , it is failing the create the external table. Getting the error "ORA-00911: invalid character".
    Can some one suggest how to import external tables
    Addressing this issue will be highly appriciated.
    Naveen

    Hi Srinath,
    When i observed the create table syntax of external table from import dump log file, it show few lines as below. I could not understand these special characters. And create table definationis failing with special character viz ORA-00911: invalid character
    ACCESS PARAMETERS
    LOCATION (EV02_PRICEMARTDATA_CSV_CON:'VPA.csv').
    I even observed the create table DDL from TOAD. It is same as i mentioned earlier
    Naveen

  • How do I create a JTable with some empty cells in it?

    I have a three column JTable. The first column is a String showing description. The second column contains numbers (double) and the third column also contains numbers. In some cases not all cells in a row should contain data. So for instance, I could have row one showing only description (a String in the first column), and then row two showing description (a String in the first column) and a number (a double in the second column) in columns one and two respectively. My problem is that, the data gets copied from the cells with data to the cells which are supposed to be empty. So, how do I create a JTable with some empty cells in it.

    I have tried empty strings for those values, but it did not work. My table puts objects in an arraylist called reconciliation. The arraylist takes different objects with the same super class. The code below explains. Are you suggesting I pass null to my constructor?
    JTable table = new JTable(new ReconTableModel());The method below is from the table model
    protected  List<Reconciliation> reconciliation = new ArrayList<Reconciliation>();
    protected void fillModel(){
          reconciliation.add(new CashBook("Cash Book Report"," "," "));
          reconciliation.add(new CheckingBankAccount("Checking Bank Account"," "," "));
          reconciliation.add(new BankBalance("Bank Balance As Per Bank Statement",500," "));
          reconciliation.add(new PaymentVouchers("Payment Voucher Receipt",300," "));
          reconciliation.add(new DepositVoucher("Deposit Voucher Receipt",1000," "));
          reconciliation.add(new ReconciledBalance("Reconcilied Bank Balance",1200," "));
          reconciliation.add(new BalanceAt("Bank Balance At",800," "));
          reconciliation.add(new Difference("Difference",400," "));
          Collections.sort( reconciliation, new Comparator<Reconciliation>(){
          public int compare( Reconciliation a, Reconciliation b) {
            return a.getTransactionName().compareTo( b.getTransactionName());
      }

  • How to hide a table row in pdf  using javascript?

    How to hide a table row in pdf  using javascript?

    This is only possible with LiveCycle Designer forms, not PDF forms created
    in Acrobat.

  • Applying table scroll bar for only table rows with table columns fixed.

    hi oa gurus,
    i had implemented table scroll bars using oarawtextbean , there is no problem in vertical and horizontal scroll bar working its working fine. but the requirement is i need to scroll only the table rows with table columns fixed. so , how to achieve the table scroll for only table datas neglecting table headers.
    the code for vertical and horizontal bars scroll is like this,
    OARawTextBean ors = (OARawTextBean)webBean.findChildRecursive("raw1");
    ors.setText(div id=tabledivid style=height:500px;width:100%; overflow:auto>);
    OARawTextBean ore = (OARawTextBean)webBean.findChildRecursive("raw2");
    ore.setText("</div>");
    where raw1 and raw2 are rawtextbean created above and below of the table . but i dont know hoow to apply this only for table rows neglecting table columns , can anybody give any ideas.
    pelase this is very urgent , can u help me in this regards
    thanks
    Edited by: user630121 on Sep 29, 2008 5:17 AM
    Edited by: user630121 on Sep 29, 2008 5:18 AM

    hi,
    I have a similar task to do... Only to apply scrollbar at the table level.
    I tried using the above mentioned but I am facing Null Pointer Exception..
    Please explain about raw1 and raw2
    Rahul

  • HOW KIND OF Standard table related with vk11, vk12 and vk13?

    HI, EVERYONE,
    HOW KIND OF Standard table related with vk11, vk12 and vk13?
    I want to know about how many and how kind Standard table related with vk11, vk12, vk13.
    I'v found some table like konp and a601 ~ a609, also I want to know about those table of uses?
    I am starting to study about vk11.
    please help me.

    Hi Reena,
    Then main pricing related tables are KONH  header details, and KONP item details.
    The other tables your have mentioned like A601,A609.............. all these are condition tables, which stored the values which you save for access sequence combination.
    Eg : For condition type PR00, lets us assume one key combination customer/material, so these details will be saved in condition table which is initially generated with fields as a part of condition techinque.
    So here the table would be A005 i guess or its A006.
    So like wise there will be condition tables for each key combination.
    Regards
    v K

  • How can I link table KONV with table VBRP and VBRK using KSCHL field?

    Hi experts,
    How can I link table KONV with table VBRP/VBRK using KSCHL field so that items are fully filtered?
    Thanks,

    Hi,
    If you do not want to specify it as hard code, then define a variable for it if you want to pass the value for it from the selection screen so that it will be dynamic. Code will be as follows.
    select-options: x_KSCHL for T685l-KSCHL.
    select kwert
               kbetr
               knumv
               kposn
               kschl
          from konv
          into CORRESPONDING FIELDS OF TABLE it_konv
          FOR ALL ENTRIES IN it_all
          where knumv = it_all-knumv
          and   kposn = it_all-b_posnr
          and   kschl in x_KSCHL. "Dynamic Selection as per the selection screen input
      endif.
    Hope this helps.
    Regards,
    Chandravadan

  • HT4085 how to lock the tauch screen with some password or dots like android to prevent misuse. And also screen lock to prevent interruption while watching movie reading books etc.

    how to lock the tauch screen with some password or dots like android to prevent misuse. And also screen lock to prevent interruption while watching movie reading books etc.

    You can set a passcode to be requied to unlock the iPad via Settings > General > Passcode Lock. In terms of locking the actual screen whilst using an app, then that isn't currently possible, but with iOS 6 in the Autumn there will be a new 'accessibility' feature (from here) which will allow you :
    ... to limit an iOS device to one app by disabling the Home button, as well as restrict touch input on certain areas of the screen

  • I want to read and assign value of ADF Table rows  with Java Script

    Hi,
    I want to read and assign value of ADF Table rows with Java Script, but I cant true index of current row , so I assign wrong value to anathor column of ADF Table.
    My Code;
    ADF Table items
    <af:column sortProperty="Adet" sortable="false"
    headerText="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.labels.Adet}"
    binding="#{backing_ucret.column2}" id="column2">
    <af:inputText value="#{row.Adet}"
    required="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.attrDefs.Adet.mandatory}"
    columns="10"
    binding="#{backing_ucret.inputText2}"
    id="inputText2" onchange="getTutar('#{bindings.voHarcamaOdeme1Iterator.rangeStart + bindings.voHarcamaOdeme1Iterator.currentRowIndexInRange + 1}','#{bindings.voHarcamaOdeme1Iterator.estimatedRowCount}','#{row.index}')">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.formats.Adet}"/>
    </af:inputText>
    </af:column>
    MY JAVA SCRIPT CODE
    <f:verbatim>
    <script language="javascript" type="text/javascript">
    function getTutar(rowkey,totalrow,currentRow){
    alert('rowkey--totalRow--currentRow-->'+rowkey+'--'+totalrow+'--'+currentRow);
    if (currentRow==0) {
    rowkey=totalrow-1;
    }else{
    var rw=totalrow-currentRow-1;
    rowkey=rw;
    alert(document.getElementById('form1:table1:'+rowkey+':inputText8').value);
    alert(document.getElementById('form1:table1:'+currentRow+':inputText8').value);
    var birim_ucret=document.getElementById('form1:table1:'+rowkey+':inputText8').value;
    var adet=document.getElementById('form1:table1:'+rowkey+':inputText2').value;
    document.getElementById('form1:table1:'+rowkey+':inputText3').value=birim_ucret*adet;
    document.getElementById('form1:inputText6').value=0;
    var t;
    var toplam=0;
    alert('before Sum');
    for (var i=0;i!=totalrow-1;i++){
    t = document.getElementById('form1:table1:'+i+':inputText3');
    toplam+=t.value*1;
    document.getElementById('form1:inputText6').value=toplam;
    </script>
    </f:verbatim>

    You can achieve the use case you describe with partial page rendering (PPR), a feature of the ADF Faces framework. Here are a few posts that achieve an interactive behavior using PPR. Off the top of my head I do not know of an exact example, but this should be a good starting point:
    http://thepeninsulasedge.com/blog/2006/09/12/adf-faces-aftableselectmany/
    http://thepeninsulasedge.com/blog/2006/08/31/adf-faces-working-with-aftableselectone-and-the-dialog-framework/
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to use External Tables

    Hi, I want to know how to use external tables? The procedure i follow for SQL*Loader in my shell script is:
    Call the sqlldr
    Check return code
    If return code = 2. get count of records from bad file and exit.
    If return code != 0 and != 2 then exit as fatal error
    If return code = 0 then continue.
    But i don't understand how to use external table as it is not invoked and does not have a return code.

    Hello,
    What do you mean alogrithim, do you mean to invoke external table as you invoke sqlldr? You can generate external table script from sqlldr and use it to load data but you might have to modify the table name and datafile name . You can see if any bad file generated from sqlldr and if yes then you can generate external table (using sqlldr) or based on your bad file. May be if you can list what exactly you want in bullet points, then it will be easier to suggest you.
    Regards

  • How do I fix my ipod with a blank screen?

    How do I fix my ipod with a blank screen?

    Start at # 3
    1-  iOS: Not responding or does not turn on
    2  Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    3 If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    4  Try on another computer                            
    5  If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • BIP report output in PDF and RTF generating some blank columns or � symbols

    Hi Experts,
    I am new to BIP. I have developed some BIP reports in 10.1.3.4.1 version which are working fine in Dev and UAT environment.
    But it's generating some blank columns and some columns with proper data and some columns with"cellphone" kind of symbol in PDF and " �"
    symbols in RTF in Prod environment.
    In all the environments the version of BIP is same.
    So any help in resolving this issue is appreciated.
    Thanks in advance..
    Regards,
    Suresh.A

    All of the complex report logic is handled in your Oracle Report (rdf) file.
    If your Oracle report is working OK, then this report should be generating XML.
    After running your report, go to the View Requests window. Highlight your request, and click the Diagnostics button. Then click the 'View XML' button. If you see XML data, then you should be OK.
    When I faced a similar issue, it was because the '1 step' process didnt work for the particular report I was using. The '1 step' process doesn't work for every report. Which report are you using?
    If the report is submitted via a form (not the concurrent manager request form), then you probably need to use 2 steps to produce the desired output.
    For more information, see the following thread:
    Enhancment to avoid 2 step check printing
    HTH,
    Mark K

  • How can an external table handle data with line feed between delimiters?

    I have defined an external table as below. My data is pipe delimited and comes from a DOS system.
    I already remove any carriage returns before putting the file into the DATA_DIR for reading. But
    I have found that some of my VARCHAR fields have embeded line feeds.
    Is it possible to have a definition that would remove any line feed characters between the delimiters?
    Below I also threw together a sample data set there ID #2 has that extra character. Yes, I could
    write an awk script to pre-process all my data files. But I am hoping there is a way for Oracle
    to also do this.
    I understand the LDTRIM to remove any leading and trailing spaces in the delimited field. Is there a
    REPLACE or TRANSLATE option. I did a bit of searching but I must be asking the wrong things.
    Thanks for any help
    Eric
    CREATE TABLE table_ext
      id        NUMBER,
      desc1     VARCHAR2(64 CHAR),
      desc2     VARCHAR2(255 CHAR),
      add_date  DATE
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY data_dir
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        CHARACTERSET WE8ISO8859P1
        BADFILE     log_dir:'table_ext.bad'
        DISCARDFILE log_dir:'table_ext.dis'
        LOGFILE     log_dir:'table_ext.log'
        FIELDS TERMINATED BY '|' LDRTRIM
        MISSING FIELD VALUES ARE NULL
        id        INTEGER EXTERNAL(38),
        desc1     CHAR(64),
        desc2     CHAR(255),
        add_date  CHAR DATE_FORMAT DATE MASK "yyyy-mm-dd hh24:mi",
      LOCATION( 'data.txt' )
    PARALLEL
    REJECT LIMIT UNLIMITED;
    1|short desc|long desc|2001-01-01 00:00
    2|short desc| long
    desc |1999-03-03 23:23
    3|short desc|  long  desc  | 2011-02-02 02:02

    Thanks for looking. But that relates to the record delimiter which in my case is the pipe character '|'. In my various data sets this is consistent. I expect each record to be one per line. But between two delimiters some data has a line feed. So I'm looking for a method that will "cleanup" the field data as it gets imported.
    I was hoping there was an option that would ignore any embedded line feeds (\n) characters. I.e., those not at the end of the line.
    Eric

  • How to Authorize external table users in OBIEE 11g

    Hi All,
    I have created Session System Variables and i am Using External table Data level Authentication and successfully external table Authentication is working.
    My question is i want to Authorize this Extrenal table users in presentation services.e.g. I want to assign some dashboards or Reports to users.
    In 10g when u login with the external table users automatically users will be created in Answers and used to assign this to webcat group.
    In 11g how to achieve this???
    Reply ASAP...
    Thanks and Regards
    Kiran Kumar
    07795980891.

    Hi Kiran,
    Check this link.
    http://www.rittmanmead.com/2010/11/oracle-bi-11g-active-directory-security-using-init-blocks-variables-10g-style/

Maybe you are looking for

  • Using CASE insted of DECODE in Control File

    Hi, I have seen a lot of examples of DECODE in a Control File. I know how to use DECODE, but I prefer CASE. Does anyone know, if it is allowed, and is the synatx the same as standard CASE statements. I am going to try it, but this is just so that I d

  • What is the connection timed out error? I have an iPod touch 4G which is just 2-3 days old.

    It is just 2 days old, s not many songs or photos in it!

  • Downloading a File with Java

    Hi My application downloads a file from a website. The problem I am having is that if no internet connection is present the program throws an exception to do with "Unable to resolve Inet Address". If there is an internet connection present it works f

  • Bridge CS6 click to change ratings

    I just upgraded to Bridge CS6.  In previous versions I could change ratings by simply left-clicking the stars under the thumbnail in filmstrip mode.  I can't find how to do this in CS6.  I can use the keyboard shortcuts  to change ratings, but I'm ki

  • Planning Beyond Planning Horizon

    I have maintained Planning Horizon of 100  in Plant and MRP group of the material.But when I am doing Planning with NETPL, Planning run is generating the proposals beyond 100 days.Can you Please let me know is there any other control  to limit Planne