Need help in writing the control file for SQLLOADER

Is it possible to error out the Sqlloader in case the data fields in the data file for a row are more than the fields stated in the control file?
i.e. My data file is something like
aaa,bbb,cc
dd,eee
And my ctl file has just 2 columns in it. Is it possible to write a control file which will cause the Sqlloader to error out?
Thanks...

Nisha,
Again I posted test example in your other post but here is how can do that
CREATE TABLE mytest111 (
   col1 NUMBER,
   col2 NUMBER,
   col3 NUMBER
LOAD DATA
TRUNCATE INTO TABLE MYTEST111
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
col1 integer external,
col2 integer external
#mytest.dat
1,2,3
1,2
SQL*Loader: Release 10.2.0.1.0 - Production on Fri Apr 10 11:40:39 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Control File:   mytest.ctl
Data File:      mytest.dat
  Bad File:     mytest.bad
  Discard File:  none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array:     64 rows, maximum of 256000 bytes
Continuation:    none specified
Path used:      Conventional
Table USIUSER.MYTEST111, loaded from every logical record.
Insert option in effect for this table: TRUNCATE
TRAILING NULLCOLS option in effect
   Column Name                  Position   Len  Term Encl Datatype
COL1                                FIRST     *   ,  O(") CHARACTER           
COL2                                 NEXT     *   ,  O(") CHARACTER           
Table MYTEST111:
  2 Rows successfully loaded.
  0 Rows not loaded due to data errors.
  0 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.
Space allocated for bind array:                  33024 bytes(64 rows)
Read   buffer bytes: 1048576
Total logical records skipped:          0
Total logical records read:             2
Total logical records rejected:         0
Total logical records discarded:        0
Run began on Fri Apr 10 11:40:39 2009
Run ended on Fri Apr 10 11:40:40 2009
Elapsed time was:     00:00:00.99
CPU time was:         00:00:00.06
{code}
Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • I need help to find the serial number for Photoshop Elements 11

    Hi! I need help to find the serial number for Photoshop Elements 11 I downloaded last year on Apple Application Store.. I have been using photoshop on mac for over a year and now need the serial number to be able to use it on macbook. I looked up Adobe's website for help but found none and noone to ask for support.. Any ideas how I can get the serial number using the App Sore bill I have?

    Please post Photoshop Elements related queries over at
    http://forums.adobe.com/community/photoshop_elements

  • Need help to add the attached file on give feedback

    Dear Sir,
    My server is EP7 , however, I use the function of feedback for the document (KM). Normally,we can give feedback to the document which store in KMcontent. However, I need to attached the new file in feedback.
    Please kindly advise.
    Thank you and best regards,
    Vimol

    Hi,
    To implemeant you own UICommand check this:
    https://media.sdn.sap.com/html/submitted_docs/nw_kmc/howto/km/flexui/Flexible%20UI%20Components.html#_Toc88990498
    Please search about UI Command in blogs and forum and help.sap.com to get some basic idea.
    Flexible UI component development demystified
    Regards,
    Praveen Gudapati

  • Need help compressing 140 minute video file for DVD+R

    Hi folks,
    I am self-teaching Final Cut Studio and DVD Studio Pro. I must admit, the manual is not helping me with some key areas.
    My first test in burning a DVD was to load a QT file into FCS then burn it to a standard DVD+R. Now, those say 120 minute capacity of course, so I wanted to compress the file.
    I exported to Compressor and chose the DV 120 Minute option the first time. When that did not work I tried the 150 Minute option. Since it takes 3-5 hours for the DVD to burn on my new G5 Dual 2.0, that is all I have had a chance to try so far.
    Since neither is working, I assume I am missing a step either in Compressor or in loading the file into DVD Studio Pro.
    It burns all the way to 99% and then says '127.5 MB needed to complete' or something like that - in yellow lettering. I take it to mean the video file needs to be 127.5 MB smaller for it to work. I could cut a few minutes out, but that isn't the point.
    Can anyone please direct me to either a page in the manual or assist me through this forum as to what error(s) I am making?
    Thanks in advance,
    Fred

    What type of audio are you encoding to? If you're using uncompressed PCM/AIFF you're going to have trouble putting 140 minutes of video on a single-layer DVD (i.e. the quality will have to be pretty low). The preset titles for Apple's settings are calculated based upon compressed Dolby AC-3 audio -- not uncompressed PCM/AIFF. Thus, the so-called 150 minute preset will only produce about 120 minutes of capacity if you are using uncompressed PCM/AIFF audio.
    If you want to put 140 minutes of video with audio on a single-layer DVD you're either going to have to use Dolby/AC-3 audio or create your own custom preset to use with PCM/AIFF audio.
    However, if you are using compressed Dolby/AC-3 audio (only) then you may just be seeing an inaccuracy in Apple's preset targets (size). In that case just lower the target or average bitrate slightly so that you can fit your 140 minutes on the DVD. Just make a copy of Apple's 150 minute preset and tweak the bitrate slightly down (since that preset seems to be getting close to your target).

  • Need help with setting the entry point for application

    Hi there,
    I am kinda new to creating JAR files for application. I checked out the tutorials for creating the jar files, and I understood most of the concepts. There is one part in the tutorial which I still don't understand
    it says:
    We want to execute the main method in the class MyClass in the package MyPackage when we run the JAR file.
    We first create a text file named Manifest.txt with the following contents:
    Main-Class: MyPackage.MyClass
    I am not exactly sure what the package is. Is it the name of the jar file, which I wish to create? Your detailed explanation would certainly be helpful. Thank you in advance.
    Regards,
    Young

    Hi there,
    I am kinda new to creating JAR files for
    for application. I checked out the tutorials for
    creating the jar files, and I understood most of the
    concepts. There is one part in the tutorial which I
    still don't understand
    it says:
    We want to execute the main method in the class
    s MyClass in the package MyPackage when we run the
    JAR file.
    We first create a text file named Manifest.txt with
    the following contents:
    Main-Class: MyPackage.MyClass
    I am not exactly sure what the package is. Is it
    it the name of the jar file, which I wish to create?
    Your detailed explanation would certainly be helpful.
    Thank you in advance.
    Regards,
    YoungIts just the package name in your code hierarchy.
    http://jarticles.com/package/package_eng.html

  • I need help in writing siginal in file

    Hi ,
    I have faced problem in writting to measurement File. I have received an error state  (( These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
    The type of the source is cluster of 3 elements.
    The type of the sink is Dynamic Data.))
    How I slove this problem?
    I have attached the labview file. i would be so grateful if you help to figure out the problem.
    Khalid
    Solved!
    Go to Solution.
    Attachments:
    Test (6) (11).vi ‏128 KB

    Hi engkhalid,
    -Yes, the Output of FFT-(RMS) is a cluster of three elements, which will not be accepted by Write to Measurement File.
    -May be you can try Unbundling the cluster and build the array and then send the data, But this will alter how the data is saved in the file i guess.
    -Please find the attachment for the modification i suggested.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Attachments:
    Test (6).vi ‏160 KB

  • Need help in writing the code

    Hi,
    My table data is as below.
    Kunnr  BDAT EDAT  D1 D2 D3 D4 D5
    1111    2001  2002   1      2    1      2     1
    1111    2003  2008   1      0    4     1      2
    1111    2008  2011   1      1    1     1      1
    2222    2003  2008   1      2    2             2
    2222    2008  2011           1    2     1      1
    Here for kunnr  between begin and end date we have to caluclate the dependencies. (I.e if there is any value in D1or D2 or D3orD4 it shoulbe counted as 1. of it is zero or blank then it should not be coutned).
    for Ex: for 1111 between 2001 & 2002 tot dependencies are 5.            
               for 1111 between 2003 & 2008 tot dependencies are 4.
    in this scenario what will be the best way of writing the code. Do we need to check each and every field when counting the Sum value or and simple way to improve the performance.
    Regards,
    Vishnu
    Edited by: Vishnuvadhan K on May 13, 2011 10:30 AM
    Moderator Message: This is not a forum, where you can get your work done by others.
    Edited by: kishan P on May 13, 2011 3:52 PM

    Hi Vishnu,
    Here, you will have to check for the range of your begin date & end date. If it comes in the said range, then you simply have to add the values of your D1, D2,... DX values which you can store in some variables by setting out a flag as one counter for each.
    If your case is satisfied for any of the date range, then just check for the flag values which are satisfied & add them or display the sum of the number of counters.
    @Ambujavalli, At End Of won't work here because the date ranges given by Vishnu will differ.
    Those statements are useful in a case when suppose for the same field value, you need to calculate a particular sum.
    Here, that is not the case. Hence, AT First & At End Of won't work.
    Thanks,
    Gayathri.
    Edited by: gnikesh88 on May 13, 2011 11:52 AM

  • Need help in writing code Customer Exit for reporting Variable

    Hello Gurus,
           I have a requirement.When a authorized user logins to view the report, he should see only customers available in the value help screen.In the value help screen it is displaying all the customers, but data is displayed perfectly fine for the authorized sales rep. By default, Value help screen displaying all the customer numbers.
    How can I restrict in the value help screen?
    Any help appreciated with points.
    Regards,
    PNK

    Hello PNK,
    You can use a variable with Process type Authorization. This enables variables to be filled with values automatically from the user authorization.
    http://help.sap.com/saphelp_sem40bw/helpdata/EN/44/599b3c494d8e15e10000000a114084/content.htm
    Thanks
    Chandran

  • Need help in writing the script in windows to read the file at runtime

    Hi All,
    I need a help with a Script. I need to read a filename from a directorty based on a specific format. I will be looking for the file in a directory that will have a file added to it each month. The script will need to go out to that directory determine the current month and Year and then grab that file based on the MONTHYEAR contained itn the file name and
    in the same script pass the filename to SQL Loader.
    The filename will consist of three parts VARIABLECONSTANTDATE.ext (example: FUELFILE11262007.txt: FUEL is a VARIABLE, FILE is constant, 11 two digit month, 26 two digit day,2007 four digit year.)
    I am stuck as how to how to read that into a string, find the file name and then pass that to sql loader.
    Any help much appreciated..
    Looking forward for your response.

    Use of External Tables will ease your problem...
    Here's what you can do:
    1. Create External tables (fuelfile.asc)
    2. Use Java code to read all filenames in a particular directory and store them in table
    3. Use PL/SQL block to loop through each filename in the table and write the file to the file of external table (fuelfile.asc)
    3.1 Transfer data from External table to main table
    Aalap Sharma :)

  • Need help in understanding the trace file

    Hi,
    I would need to understand
    - the large number of fetch for the query
    - SQL*Net message to client and SQL*Net message from clientbeing same
    - latch: cache buffers chains
    The issue I am experiencing is a 6x delay due to an unknown reason.
    Can somebody assist me?
    Thanks
    D
    SQL
    SELECT R_RO.*
    FROM
    (SELECT b.ID,b.ANSWERS,b.C_CLASSID,b.C_ID, b.FCI,b.FROM_ID,b.TCI,b.TO_ID,b.FFU, b.TFU,b.NOU,b.ISN,b.SC_NAME,
    b.DN_NAME,b.DN_ITEM_NUMBER,b.ISC, b.PRIORITY FROM VVP.RELATION b WHERE b.ID NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID FROM VVP.D94 WHERE DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id) AND SDE_STATE_ID
    = :"SYS_B_0") UNION ALL SELECT a.ID,a.ANSWERS,a.C_CLASSID, a.C_ID,a.FCI,a.FROM_ID,a.TCI, a.TO_ID,a.FFU,a.TFU,a.NOU, a.ISN,a.SC_NAME,a.DN_NAME, a.DN_ITEM_NUMBER,a.ISC,a.PRIORITY FROM VVP.A94 a, SDE.state_lineages SL WHERE (a.ID, a.SDE_STATE_ID) NOT IN (SELECT /*+ HASH_AJ */ SDE_DELETES_ROW_ID,SDE_STATE_ID FROM VVP.D94 WHERE DELETED_AT IN (SELECT l.lineage_id FROM SDE.state_lineages l WHERE l.lineage_name = :source_lineage_name AND l.lineage_id <= :source_state_id) AND SDE_STATE_ID > :"SYS_B_1") AND a.SDE_STATE_ID = SL.lineage_id AND SL.lineage_name = :source_lineage_name AND SL.lineage_id <= :source_state_id ) R_RO WHERE (ID = :"SYS_B_2")
    call count cpu elapsed disk query current rows
    Parse 3911 2.30 2.14 0 0 0 0
    Execute 3911 2.47 2.43 0 0 0 0
    Fetch 3911 268.96 270.60 28 15696558 0 3911
    total 11733 273.73 275.18 28 15696558 0 3911
    Misses in library cache during parse: 1
    Optimizer mode: FIRST_ROWS
    Parsing user id: 1031
    Rows Row Source Operation
    1 VIEW (cr=3966 pr=0 pw=0 time=84973 us)
    1 UNION-ALL (cr=3966 pr=0 pw=0 time=84968 us)
    1 HASH JOIN ANTI (cr=3963 pr=0 pw=0 time=84707 us)
    1 TABLE ACCESS BY INDEX ROWID CONNECTION (cr=4 pr=0 pw=0 time=123 us)
    1 INDEX UNIQUE SCAN R94_SDE_ROWID_UK (cr=3 pr=0 pw=0 time=88 us)(object id 7404)
    8586 VIEW VW_NSO_2 (cr=3959 pr=0 pw=0 time=112274 us)
    8586 NESTED LOOPS (cr=3959 pr=0 pw=0 time=103686 us)
    3661 INDEX RANGE SCAN LINEAGES_PK (cr=7 pr=0 pw=0 time=67 us)(object id 307740)
    8586 INDEX RANGE SCAN D94_PK1 (cr=3952 pr=0 pw=0 time=70624 us)(object id 1637355)
    0 HASH JOIN ANTI (cr=3 pr=0 pw=0 time=248 us)
    0 NESTED LOOPS (cr=3 pr=0 pw=0 time=71 us)
    0 TABLE ACCESS BY INDEX ROWID A94 (cr=3 pr=0 pw=0 time=68 us)
    0 INDEX RANGE SCAN A94_ROWID_IX1 (cr=3 pr=0 pw=0 time=65 us)(object id 129281)
    0 INDEX UNIQUE SCAN LINEAGES_PK (cr=0 pr=0 pw=0 time=0 us)(object id 307740)
    0 VIEW VW_NSO_1 (cr=0 pr=0 pw=0 time=0 us)
    0 NESTED LOOPS (cr=0 pr=0 pw=0 time=0 us)
    0 INDEX RANGE SCAN D94_PK1 (cr=0 pr=0 pw=0 time=0 us)(object id 1637355)
    0 INDEX UNIQUE SCAN LINEAGES_PK (cr=0 pr=0 pw=0 time=0 us)(object id 307740)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    SQL*Net message to client 3911 0.00 0.00
    SQL*Net message from client 3911 0.49 72.42
    latch: cache buffers chains 1434 0.00 0.07
    latch: shared pool 1 0.00 0.00
    db file sequential read 28 0.14 0.31
    latch free 15 0.02 0.04
    latch: row cache objects 1 0.00 0.00
    log file switch completion 4 0.98 1.64

    ssddgreg wrote:
    Hi Randolf,
    thank you for your excellent interpretation! I have Oracle DBMS 10.2.0.3 Ent Edition deployed on Sun Solaris (64-bit), FIRST_ROWS and CURSOR_SHARING = SIMILAR.
    I also checked the table D94.SDE_DELETES_ROW_ID about indexes, it has 3 indexes on the same column:
    D94_IX1, NONUNIQUE
    D94_IX2, UNIQUE
    D94_PK1, UNIQUE
    This table is a system table from another middle-tier application and all the DXX tables are configured like that.Is this a third-party vendor application for that you don't have any control over the schema? Because your description of the indexes looks like a potential case of massive over-indexing, increasing the workload required to maintain all this indexes. Very likely some of these indexes are redundant and could be covered by a fewer number of indexes.
    Besides that my comment regarding the execution plan was probably not clear enough - what I meant to say is that the HASH_AJ hint prevents the optimizer from doing the clever things with the predicates that I described.
    So in principle the question is: What execution plan do you get if you omit the HASH_AJ hints? And how many consistent gets requires this new plan at execution time? You might need to add a NL_AJ hint instead to achieve what I've described, but it would be interesting to see in first place what execution plan is generated without any hints.
    Some other comments:
    FIRST_ROWS optimizer mode: Does this application require you to use the FIRST_ROWS optimizer mode? Because in principle, if you have an application that actually retrieves most of the time only the first few rows of a larger result set, then you should use the FIRST_ROWS(n) optimizer mode instead. The FIRST_ROWS optimizer mode is deprecated since Oracle 9i if I remember correctly and has some odd side effects on execution plans, in particular if the SQL contains an ORDER BY clause.
    If your application usually processes all rows from a given result set, using the default optimizer mode ALL_ROWS is more appropriate - using FIRST_ROWS as a band-aid because with ALL_ROWS things are slower only shows that there is something wrong that should be addressed in a different way (by investigating why the ALL_ROWS mode doesn't arrive at a suitable execution plan as first activity).
    CURSOR_SHARING=SIMILAR: Note that CURSOR_SHARING = SIMILAR has some other side effects (and bugs). Oracle has recently announced on My Oracle Support (see document 1169017.1) that CURSOR_SHARING=SIMILAR will be deprecated (no longer supported) in Oracle 12. See this note also for a description why this setting can be problematic.
    Of course, if you don't have any control over a vendor application and it works fine and has been optimized for these settings (FIRST_ROWS, CURSOR_SHARING=SIMILAR) then there is not much you can do (or need to do) about that.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    Co-author of the "OakTable Expert Oracle Practices" book:
    http://www.apress.com/book/view/1430226684
    http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684

  • Need help with writing to a file

    I am writing a program that is a file sharing program where i read in bytes from a socket in a BufferedReader into a char[]. Then i want to write to a file using FileOutputStream which only lets me write with a byte[]. Is there a way to read in the info into a byte[] rather a char[]?

    may be this code helps
    import java.io.*;
    public class cp
            public static void main(String args[])
                    try
                    File my=new File("source.txt");
                    FileReader fr=new FileReader(my);
                    BufferedReader br=new BufferedReader(fr);
                    String a;
                    FileWriter fw=new FileWriter(args[5]);
                    while((a=br.readLine())!=null)
                            System.out.println(a);
    fw.write(a);
    fw.close();
                    }catch(Exception e){}

  • Need help in writing the query

    The initial data is as follows:
    ID PARENT_ID
    =============
    1 NULL
    2 NULL
    3 2
    4 6
    5 3
    6 7
    7 4
    8 NULL
    but output is as follows in such way that Parent_Id should be displayed in ID place
    ID PARENT_ID
    =============
    1 NULL
    2 NULL
    3 2
    8 NULL
    6 8
    4 6
    5 3
    7 4
    Can any one help how resolve this query?
    Thanks in advance

    Your output is inconsistent with initial data :) But
    select * from t start with parent_id is null connect by parent_id = prior id;

  • Need help with changing the product name for a HP LaserJet Pro 401n to use on a ePrint network.

    I am in a school environment, naming printers is imortant. 
    Bonjour Service Name and Device Description name have been changed. IOS7 devices see the Bonjour name but ChromeBooks see the Product name. How can I change the Product name on the printer so that it is then recognized by HP Connected and shown to ChromeBook devices?

    You should be able to change the product name in Google Cloud.  The ChromeBook uses Google Cloud to print (Google Cloud uses HP ePrint).  Log into your google account and change the printer name there.
    I am an HP employee.
    Opinions expressed are mine and do not necessarily reflect the opinions of HP.
    Reminder: Please select the Accept as Solution button on the post that best answers your question. Also, you may select the Kudos button on any helpful post to give that person a quick thanks.

  • Control file for the sql*loader

    hi
    i'm doing my project in database management as the part of my project i have to write the control file for the sql*loader so, any one please clear the funda...so that i can get back to my project work...help me with sample code ..

    Refer chapter 3 and 5 on this url for sql loader and its control file references :
    http://download-west.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90192/toc.htm
    or
    http://download-east.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90192/toc.htm
    You may also refer sql loader examples on this page:
    http://otn.oracle.com/sample_code/products/intermedia/htdocs/avi_bulk_loading.html
    Chandar

  • Help me out to get the jar files for FileUpload using MyFaces.

    hi,
    Can anyone help to get the jar files for FileUpload using MyFaces.
    I want myfaces-extensions.jar and commons-fileupload-1.0.jar.
    Thank you.

    you can't control the speed of a for-loop.
    you can remove your code from a for-loop and use a function to execute the code in your for-loop and you control how frequently you call the function.

Maybe you are looking for