How do I skip footer records in Data file through control file of sql*loade

hi,
I am using sql*loader to load data from data file and i have written control file for it. How do i skip last '5' records of data file or the footer records to be skiped to read.
For first '5' records to be skiped we can use "skip" to achieve it but how do i acheive for last '5' records.
2)
Can I mention two data files in one control file if so what is the syntax(like we give INFILE Where we mention the path of data file can i mention two data file in same control file)
3)
If i have datafile with variable length (ie 1st record with 200 charcter, 2nd with 150 character and 3rd with 180 character) then how do i load data into table, i mean what will be the syntax for it in control file.
4)if i want to insert sysdate into table through control file how do i do it.
5) If i have variable length records in data file and i have first name then white space between then and then last name, how do i insert this value which includes first name and last name into single column of the table.( i mean how do you handle the white space in between first name and last name in data file)
Thanks in advance
ram

You should read the documentation about SQL*Loader.

Similar Messages

  • How to use the DISPLAY RECORD Setup Command in an etext file?

    Hi All,
    How to use the DISPLAY RECORD Setup Command in an etext file?
    I want to display a <NEW RECORD> conditionally. The condition will be based on the data coming through from the xml file.
    Please help me with an example. The BI User guide also doesnt show any examples.
    Your help is appreciated.
    Rgds,
    Kiran Panditi

    Hi,
    You can use vb coding in BEx Analyser to calculate your unit price. For this you have to first display the attributes of your object "XYZ". Then you can use VB cosing to calculate the value for the unit price field.
    One more thing cna you clarify whether is it display attribute or variable ?
    Regards,
    Balajee

  • HT2486 how can I export the contact book data to a csv file for editing?

    how can I export the contact book data to a csv file for editing?

    You can edit a card right in Contacts. No need to export and re-import.
    Select a name and on the right side, click the Edit button:

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • How to save info in a meta-data of a jpg file?

    hi, i need to know how to save info in a meta-data of a jpg file:
    this is my code (doesn't work):
    i get an exception,
    javax.imageio.metadata.IIOInvalidTreeException: JPEGvariety and markerSequence nodes must be present
    at com.sun.imageio.plugins.jpeg.JPEGMetadata.mergeNativeTree(JPEGMetadata.java:1088)
    at com.sun.imageio.plugins.jpeg.JPEGMetadata.mergeTree(JPEGMetadata.java:1061)
    at playaround.IIOMetaDataWriter.run(IIOMetaDataWriter.java:59)
    at playaround.Main.main(Main.java:14)
    package playaround;
    import java.io.*;
    import java.util.Iterator;
    import java.util.Locale;
    import javax.imageio.*;
    import javax.imageio.metadata.IIOMetadata;
    import javax.imageio.metadata.IIOMetadataNode;
    import javax.imageio.plugins.jpeg.JPEGImageWriteParam;
    import javax.imageio.stream.*;
    import org.w3c.dom.*;
    public class IIOMetaDataWriter {
    public static void run(String[] args) throws IOException{
    try {
    File f = new File("C:/images.jpg");
    ImageInputStream ios = ImageIO.createImageInputStream(f);
    Iterator readers = ImageIO.getImageReaders(ios);
    ImageReader reader = (ImageReader) readers.next();
    reader.setInput(ImageIO.createImageInputStream(f));
    ImageWriter writer = ImageIO.getImageWriter(reader);
    writer.setOutput(ImageIO.createImageOutputStream(f));
    JPEGImageWriteParam param = new JPEGImageWriteParam(Locale.getDefault());
    IIOMetadata metaData = writer.getDefaultStreamMetadata(param);
    String MetadataFormatName = metaData.getNativeMetadataFormatName();
    IIOMetadataNode root = (IIOMetadataNode)metaData.getAsTree(MetadataFormatName);
    IIOMetadataNode markerSequence = getChildNode(root, "markerSequence");
    if (markerSequence == null) {
    markerSequence = new IIOMetadataNode("JPEGvariety");
    root.appendChild(markerSequence);
    IIOMetadataNode jv = getChildNode(root, "JPEGvariety");
    if (jv == null) {
    jv = new IIOMetadataNode("JPEGvariety");
    root.appendChild(jv);
    IIOMetadataNode child = getChildNode(jv, "myNode");
    if (child == null) {
    child = new IIOMetadataNode("myNode");
    jv.appendChild(child);
    child.setAttribute("myAttName", "myAttValue");
    metaData.mergeTree(MetadataFormatName, root);
    catch (Throwable t){
    t.printStackTrace();
    protected static IIOMetadataNode getChildNode(Node n, String name) {
    NodeList nodes = n.getChildNodes();
    for (int i = 0; i < nodes.getLength(); i++) {
    Node child = nodes.item(i);
    if (name.equals(child.getNodeName())) {
    return (IIOMetadataNode)child;
    return null;
    static void displayMetadata(Node node, int level) {
    indent(level); // emit open tag
    System.out.print("<" + node.getNodeName());
    NamedNodeMap map = node.getAttributes();
    if (map != null) { // print attribute values
    int length = map.getLength();
    for (int i = 0; i < length; i++) {
    Node attr = map.item(i);
    System.out.print(" " + attr.getNodeName() +
    "=\"" + attr.getNodeValue() + "\"");
    Node child = node.getFirstChild();
    if (child != null) {
    System.out.println(">"); // close current tag
    while (child != null) { // emit child tags recursively
    displayMetadata(child, level + 1);
    child = child.getNextSibling();
    indent(level); // emit close tag
    System.out.println("</" + node.getNodeName() + ">");
    } else {
    System.out.println("/>");
    static void indent(int level) {
    for (int i = 0; i < level; i++) {
    System.out.print(" ");
    }

    Hi,
    Yes, you need store data to table, and fetch it when page is opened.
    Simple way is create table with few columns and e.g. with CLOB column and then create form based on that table.
    Then modify item types as you like, e.g. use HTML editor for CLOB column
    Regards,
    Jari

  • How can I make a query by date with several TDMS files?

    Hi,
    I have a project that can write and read TDMS files everyday (a file for each day with date and time). There, I can import those files to excel (I choose a file and load it). But, I have a question: How can I make a query by date with those TDMS files? I'd like make a time stamp for start date and stop date, where I could compare the TDMS file dates and sum the values that are in the channels where these files are similar. For example, I save a file with "02/01/2013" name, in other day "03/01/2013", in other day "04/01/2013"... so, i'd like put in time stamp for start date "02/01/2013" file and to stop date "04/01/2013" file, than, sum all values that range with my TDMS files existing. How can I make that? 
    Thanks all,
    Val 

    Hello Val_Auto.
    You're Brazilian, no? Me too. = ^ - ^ =
    I converted VI to version of your LabVIEW (8.5). Is attached in this reply.
    This VI search all your TDMS in a range of dates and join them in a single TDMS. I hope this is what you wanted.
    Query TDMS is the main VI. The TDMS VI Search changes the date format that out from calendar control (which is DD / MM / YYYY) to DD-MM-YYYY. This is because you can't name files using "/". I chose "-" but, if necessary, you should change to keep the same format of your TDMS files.
    If you have any doubt as to its operation or how to make changes to adapt VI for your application, keep at your disposal.
    Thank you for your contact; I hope have helped you and succeed in your application.
    Wesley Rocha
    Application Engineer
    National Instruments Brazil
    Visite a nossa comunidade em PORTUGUÊS!!!
    Attachments:
    Query TDMS.vi ‏62 KB
    tdms search.vi ‏24 KB

  • How do I get the last changed date & time of a file in app server?

    Hi Experts,
    How do I get the last changed date & time of a file in app server?
    Thanks!
    - Anthony -

    Hi,
    that's what I use...
      CALL 'C_DIR_READ_FINISH'.             " just to be sure
      CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
      IF sy-subrc <> 0.
        EXIT. "Error
      ENDIF.
      DO.
        CLEAR l_srvfil.
        CALL 'C_DIR_READ_NEXT'
          ID 'TYPE'   FIELD l_srvfil-type
          ID 'NAME'   FIELD l_srvfil-file
          ID 'LEN'    FIELD l_srvfil-size
          ID 'OWNER'  FIELD l_srvfil-owner
          ID 'MTIME'  FIELD l_mtime
          ID 'MODE'   FIELD l_srvfil-attri.
    *    l_srvfil-dir = p_path .
        IF sy-subrc = 1.
          EXIT.
        ENDIF." sy-subrc <> 0.
        PERFORM p_to_date_time_tz
          USING    l_mtime
          CHANGING l_srvfil-mod_time
                   l_srvfil-mod_date.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        PERFORM translate_attribute CHANGING l_srvfil-attri.
        CHECK:
          NOT l_srvfil-file = '.',
          l_srvfil-type = 'D' OR
          l_srvfil-type = 'F' .
        APPEND l_srvfil TO lt_srvfil.
      ENDDO.
      CHECK NOT lt_srvfil IS INITIAL.
      pt_srvfil = lt_srvfil.
    FORM p_to_date_time_tz  USING    p_ptime  TYPE p
                            CHANGING p_time   TYPE syuzeit
                                     p_date   TYPE sydatum.
      DATA:
        l_abaptstamp TYPE timestamp,
        l_time       TYPE int4,
        l_opcode     TYPE x VALUE 3,
        l_abstamp    TYPE abstamp.
      l_time = p_ptime.
      CALL 'RstrDateConv'
        ID 'OPCODE' FIELD l_opcode
        ID 'TIMESTAMP' FIELD l_time
        ID 'ABAPSTAMP' FIELD l_abstamp.
      l_abaptstamp = l_abstamp.
      CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
          TIME p_time.
    ENDFORM.                    " p_to_date_time_tz
    Regards,
    Clemens

  • Load data with SQL Loader link field between CSV file and Control File

    Hi all,
    in a SQL Loader control file, how do you specify link with field in CSV file and Control file?
    E.g. if I wat to import the record in table TEST (col1, col2, col3) with data in csv file BUT in different position. How to do this?
    FILE CSV (with variable position):
    test1;prova;pippo;Ferrari;
    xx;yy;hello;by;
    In the table TEST i want that col1 = 'prova' (xx),
    col2 = 'Ferrari' (yy)
    col3 = default N
    the others data in CSV file are ignored.
    so:
    load data
    infile 'TEST.CSV'
    into table TEST
    fields terminated by ';'
    col1 ?????,
    col2 ?????,
    col3 CONSTANT "N"
    Thanks,
    Attilio

    With '?' mark i mean " How i can link this COL1 with column in csv file ? "
    Attilio

  • How to Load Multiple Files in Oracle Database using Sql Loader

    Hi All,
    I want to import multiple files in my DB using Sql*Loader. Please tell me the Syntax, how can I import multiple files using one Control File?
    Thanks & Regards,
    Imran

    Hi,
    You might get a good response to your post in the forum dedicated to data movement , including SQL*Loader . You can find it here Export/Import/SQL Loader & External Tables
    Regards,

  • Regard ora-01207: How Oracle judge file is more recent than control file - old control file

    ORA-00283: recovery session canceled due to errors
    ORA-01122: database file 2 failed verification check
    ORA-01110: data file 2: '/tmp/auxsys.dbf_rman'
    ORA-01207: file is more recent than control file - old control file
    How Oracle judge file is more recent than control file - old control file, then it thrown out error ora-01207.
    It must compare data file with control file, but what compare?

    Begin from the beginning.
    Did you do a RESTORE DATABASE ?
    Or did you selectively restore datafiles ?
    Strange datafile name --- looks like it could have been a DATAFILECOPY done using rman.
    It is a very bad idea to have a datafile in /tmp   On some OSs, /tmp may get cleared of files on a reboot.
    Hemant K Chitale

  • How to skip footer record in SQL*Loader input file

    I have am using SQL*Loader in a batch import process.
    The input files to SQL*Loader have a header record and footer record - always the 1st and last records in the file.
    I need SQL*Loader to ignore these two records in every file when performing the import. I can easily ignore the header by using the SKIP function.
    Does anybody know how to ignore the last record (footer) in an input file??
    I do not want to physically pre-strip the footer since the business want all data files to have the header and footer records.

    Thanks - how do I use the when clause to specify the last line of the input file?
    I am presuming it requires me to have a unique identifier at a given position on that last line. If I don't have such an identifier can I still use your solution?
    Cheers Why not putting an idetifier at the end of your input file: echo "This_is_the_End" >> input_file ?

  • How do I select more records using data blocks, set_block_property

    Hi, I am new in oracle forms builder. I want to fetch more then one records using set_block_property and data block. please help me. How do I select more then one data? I don't have any Idea about Oracle
    Please Help its urgent

    What is your Forms version?  Is your form in "Form" (single record) or "Tabular" (multi-record) layout?  You can't use the SET_BLOCK_PROPERTY() built-in to change the number of records that are displayed - this must be done during design through the Forms Builder.
    What exactly are you needing to do?
    Craig...

  • How to update a table AUTOMATICALY with data from a .txt file??

    HI ,
    I want to upload data which is in a notepad file and Create a table. This notepad file stores a string of datas. Here, the data comes in to the .txt file every second.
    (The data is actually stored into the notepad file when a program is executed in Processing.js software)
    Is it possible to do the following using APEX ? ?
    1. This table has to be updated automatically once in 2 minutes (I want this completely automatic, no human intervention -- no update buttons)
    2. A report is to be created in a apex application with this table, it should reflect the updates in the table every 2 minutes.
    Is it possible?? give your ideas.. I want to do this soon for my engineering project :) Any help from you is appreciated. :)
    Edited by: user13301695 on 28-Mar-2011 10:09

    And how do you expect your database server to access a local file in your machine ?
    Is the file accessible from outside your machine say inside a webserver folder so that some DB process can poll on the file ?
    Or, is your DB server in the same machine where you have the text file ?
    You will have to figure out the file acess part before automating user interaction or even auto-refreshing.

  • How can i validate the data in the control file?

    Consider that the SQLLoader reads the Input data File from the path and it loads the data into the tables based up on the descrition specified in the control File.
    First, the table to be filled is created:
    create table sql_loader_1 ( load_time date, field_1 Numeric, field_2 varchar2(10)
    Sample Control File :
    load_1.ctl
    load data
    infile 'load_1.dat' "str '\r\n'"
    insert into table sql_loader_1
    load_time sysdate,
    field_2 position( 1:10),
    field_1 position(11:20)
    Note that the positions 11 through 20 are loaded into field_1 and positions 1 through 10 into field_2. The field load_time is filled with the current time (sysdate) of the load.
    Here's the data. The name of the file (load_1.dat) had been specified with the infile statement in the control file.
    load_1.dat
    0123456789abcdefghij
    foo bar
    here comes a very long line
    and the next is
    short
    Here i want to validate the field_1 (Numeric Datatype) since the data file contains the character value (i.e)abcdefghij

    Good question for this forum:
    Export/Import/SQL Loader & External Tables
    Werner

  • How can I save images and text data to the same file?

    I have been looking at ways to do this for a while. My main VI saves the raw data to a text file which the users then import to Excel and plot. I am trying to simplify this process and have been looking at ways to accomplish this task. I want to be able to save the raw data to a file and then save the Labview graph as well. This will eliminate the tedious task of importing the raw data into Excel and plotting it. I can save the raw data to its own file and I can use the Get Image method for the graph and save it to its own file. I am currently using the .png format. Is there a way of saving both to the same file ie, importing the image into Excel or Word etc. Before I go off doing a science project I wanted to see if anyone else had experience completing this task and had any recommendations. Thanks in advance for any help.

    well ther are a couple of ways. You could use the standard report generation VI's and make a complete report with the image of the graph embedded into the report with the raw data or you could use activeX and control excel thru LV and put the raw data into excel directly and have excel graph the data without any user interaction. I have posted a slew of VI's on the excel board if you do not have the report generation toolkit. If you could tell me which way you want to go I could possibly send you an example.
    For more information and some sample VI's and tool kits, you can go to the excel board
    Joe.
    "NOTHING IS EVER EASY"

Maybe you are looking for

  • Blue screen error c824C1500 on HP Photosmart All-in-one series C5580

    A blue screen error c824C1500 appears on my HP Photosmart All-in-one series C5580's display when I turn it on. I have gone through the basic troubleshooting solution and it give me the same error message when I plug the power cord back in. Any other

  • How do store a time type field in a database table?

    We added a UDF of time type.  SQL Server says its a small integer.  After I pull the time off a date, I convert it to an integer.  For example, I convert 6:00 AM to 600.  When I try to store 600 in the field, I get a type mismatch exception.  What am

  • User-defined Attributes in CRM WebUI

    Hi there, I am using the Attribute 1 (defined in IMG->CRM->Master Data->BP->Define Attributes->Define User-Defined Attributes) to determine if a customer may or may not be given credit, just a simple yes or no attribute. My question is how to make th

  • Hierarchy authorization based on 0CCA_O01

    Hello experts, I have loaded single values & intervals for costcenters authorizations into 0CCA_O01. I have no heirarchy authorizations available. Now user still wants to select costcenters in query by hierarchy nodes, but he should only see nodes an

  • Is iCloud replacing mobile me?

    Is iCloud replacing mobile me.  My mobile me is running very slow or not loading at all and everything else seems to be fine.