SQL Loader-How to insert -ve & date values from flat text file into coloumn

Question: How to insert -ve & date values from flat text file into coloumns in a table.
Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
How to load such values in columns of database using SQL Loader?
Please guide.

Question: How to insert -ve & date values from flat text file into coloumns in a table.
Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
How to load such values in columns of database using SQL Loader?
Please guide. Try something like
someDate    DATE 'DDMMYYYY'
someNumber1      "TO_NUMBER ('s99999999.00')"
someNumber2      "TO_NUMBER ('99999999.00s')"Good luck,
Eric Kamradt

Similar Messages

  • How to read sampled data info from a "*.au"file into an array?

    I need to manipulate the sound file directly using DSP, the first step is to read sampled data from "*.au" file into an array. How can I do that? Thanks a lot!!

    There is a file I/O tutorial in the Java Tutorial (google for Java Tutorial). You can read an .au file as bytes like any binary file.
    Or if you are using the Java Sound API, google for java sound api or java audio tutorial etc etc.

  • How to change a date value from "java.util.Date" to "java.sql.Date"?

    Hi all,
    How to change a date value from "java.util.Date" to "java.sql.Date"?
    I m still confusing what's the difference between them.....
    thanks
    Regards,
    Kin

    Thanks
    but my sql statement can only accept the format (yyyy-MM-dd)
    such as "select * from xx where somedate = '2004-12-31'
    but when i show it to screen, i want to show it as dd-MM-yyyy
    I m using the following to change the jave.util.Date to str and vice versa. But it cannot shows the dd-MM-yyyy. I tried to change the format from yyyy-MM-dd to dd-MM-yyyy, it shows the wrong date in my application.
         public String date2str(java.util.Date thisdate)     {
              if (thisdate != null)     {
                   java.sql.Date thissDate = new java.sql.Date(thisdate.getTime());
                   return date2str(thissDate);
              }     else     {
                   return "";
         public String date2str(java.sql.Date thisdate)     {
              if (thisdate != null)     {
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   return sdf.format(thisdate);
              }     else     {
                   return "";
         public java.util.Date str2date(String thisdate)     {
              String dateFormat = "yyyy-MM-dd"; // = 1998-12-31
              java.util.Date returndate = null;
              if (thisdate != null)     {
                   SimpleDateFormat dateFormatter = new SimpleDateFormat(dateFormat);
                   try {
                        returndate = dateFormatter.parse(thisdate);
                   } catch (ParseException pe) {
                        System.out.println (pe.getMessage());
              return returndate;
         }

  • How do I return two values from a stored procedure into an "Execute SQL Task" within SQL Server 2008 R2

    Hi,
    How do I return two values from a
    stored procedure into an "Execute SQL Task" please? Each of these two values need to be populated into an SSIS variable for later processing, e.g. StartDate and EndDate.
    Thinking about stored procedure output parameters for example. Is there anything special I need to bear in mind to ensure that the SSIS variables are populated with the updated stored procedure output parameter values?
    Something like ?
    CREATE PROCEDURE [etl].[ConvertPeriodToStartAndEndDate]
    @intPeriod INT,
    @strPeriod_Length NVARCHAR(1),
    @dtStart NVARCHAR(8) OUTPUT,
    @dtEnd NVARCHAR(8) OUTPUT
    AS
    then within the SSIS component; -
    Kind Regards,
    Kieran. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Below execute statement should work along the parameter mapping which you have provided. Also try specifying the parameter size property as default.
    Exec [etl].[ConvertPeriodToStartAndEndDate] ?,?,? output, ? output
    Add a script task to check ssis variables values using,
    Msgbox(Dts.Variables("User::strExtractStartDate").Value)
    Do not forget to add the property "readOnlyVariables" as strExtractStartDate variable to check for only one variable.
    Regards, RSingh

  • How do I overide the values in the text file

    I am reading a text file using loadvars, to get some values
    such as
    &yourid=123456 from the text file.
    How do I overide the values in the text file
    <PARAM NAME=movie VALUE="jamietrailer.swf?yourid=65432
    <---- this doesn't seem to work
    So I can change the values from the html file?

    I want to do this:
    # It should look like this:
    <PARAM NAME=movie VALUE= "movie.swf?text=hello">
    # Find the EMBED tag. Look for this:
    <EMBED src="/support/flash/ts/documents/movie.swf"
    # Again, replace the filename "movie.swf" with
    "movie.swf?text=hello".
    It should look like this:
    <EMBED
    src="/support/flash/ts/documents/movie.swf?text=hello"
    Is this supposed to overide the value I am reading using
    loadvars?
    or do I have to not read the value from the file if I am
    going to give it a value in html?

  • How do i read complete line from a text file in j2me?????

    how do i read complete line from a text file in j2me????? I wanna read file line by line not char by char..Even i tried with readUTF of datainputstream to read word by word but i got UTFDataFormatException.. Please solve my problem.. Thanks in advance..

    That is not my problem . i already read it char by char.. i am getting complete line..But this process is taking to much time..So thats why i directly wanna read complete line or word to save time..

  • How to import data from a text file into a table

    Hello,
    I need help with importing data from a .csv file with comma delimiter into a table.
    I've been struggling to figure out how to use the "Import from Files" wizard in Oracle 10g web-base Enterprise Manager.
    I have not been able to find a simple instruction on how to use the Wizard.
    I have looked at the Oracle Database Utilities - Overview of Oracle Data Pump and the Help on the "Import: Files" page.
    Neither one gave me enough instruction to be able to do the import successfully.
    Using the "Import from file" wizard, I created a Directory Object using the Create Directory Object button. I Copied the file from which i needed to import the data into the Operating System Directory i had defined in the Create Directory Object page. I chose "Entire files" for the Import type.
    Step 1 of 4 is the "Import:Re-Mapping" page, I have no idea what i need to do on this page. All i know i am not tying to import data that was in one schema into a different schema and I am not importing data that was in one tablespace into a different tablespace and i am not R-Mapping datafiles either. I am importing data from a csv file.
    For step 2 of 4, "Import:Options" page, I selected the same directory object i had created.
    For step 3 of 4, I entered a job name and a description and selected Start Immediately option.
    What i noticed going through the wizard, the wizard never asked into which table do i want to import the data.
    I submitted the job and I got ORA-31619 invalid dump file error.
    I was sure that the wizard was going to fail when it never asked me into which table do i want to import the data.
    I tried to use the "imp" utility in command-line window.
    After I entered (imp), i was prompted for the username and the password and then the buffer size as soon as i entered the min buffer size I got the following error and the import was terminated:
    C:\>imp
    Import: Release 10.1.0.2.0 - Production on Fri Jul 9 12:56:11 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Username: user1
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Import file: EXPDAT.DMP > c:\securParms\securParms.csv
    Enter insert buffer size (minimum is 8192) 30720> 8192
    IMP-00037: Character set marker unknown
    IMP-00000: Import terminated unsuccessfully
    Please show me the easiest way to import a text file into a table. How complex could it be to do a simple import into a table using a text file?
    We are testing our application against both an Oracle database and a MSSQLServer 2000 database.
    I was able to import the data into a table in MSSQLServer database and I can say that anybody with no experience could easily do an export/import in MSSQLServer 2000.
    I appreciate if someone could show me how to the import from a file into a table!
    Thanks,
    Mitra

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • How to do import data from the text file into the mathscript window?

    Could anyone tell me how to do import data from text file into mathscript window for labview 8?
    MathScript Window openned, File, Load Data - it has options: custom pattern (*.mlv) or all files. 
    Thanks

    Hi Milan,
    Prior to loading data in Mathscript Window , you have to save the data from the Mathscript window (the default extension of the file is .mlv but you can choose any extension). This means that you cannot load data from a text file  that was not created using the Mathscript window.
    Please let me know if you have any further questions regarding this issue.
    Regards,
    Ankita

  • How do you read data from a text file into a JTextArea?

    I'm working on a blogging program and I need to add data from a text file named messages.txt into a JTextArea named messages. How do I go about doing this?

    Student_Coder wrote:
    1) Read the file messages.txt into a String
    2) Initialize messages with the String as the textSwing text components are designed to use Unix-style linefeeds (\n) as line separators. If the text file happens to use a different style, like DOS's carriage-return+linefeed (\r\n), it needs to be converted. The read() method does that, and it saves the info about the line separator style in the Document so the write() method can re-convert it.
    lethalwire wrote:
    They have 2 different ways of importing documents in this link:
    http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
    Neither of those methods applies to JTextAreas.

  • Reading value from a text file

    hi ,
    I have a text filed with values for this field lotid , how in PL/SQL can i make use of the values from this file
    in query like select * from tbl1 a where a.lotid = values from text file ?
    kindly advise
    tks & rdgs

    Following the example Elyo gave:
    CREATE TABLE MyTable(line VARCHAR2(4000)) ORGANIZATION EXTERNAL (
    default directory MyFolder
    access parameters
    (fields terminated by ',')
    location ('test.txt')
    1- use, eg.: fields terminated by ',' to indicate your separator character.
    I'm not sure I understand the second question.

  • Reading data from a text file into PAS - Dimension member names truncated

    Hi,
    I created a procedure to dump variables and data into a text file to load into another model. I used a semicolon as a field seperator.
    The data, measures and dimension members are dumped properly into a text file and no dimension member names are truncated .
    However when I read the data into  a measure, and I issue a peek command, dimension meber names are read in truncated
    and remain full names in the text file. Any reason for this? What do I need to do to prevent this from happening?
    THanks.
    Lungile

    Hi Lungile,
    The problem that you're likely having is that you haven't created a file description for the file from which you're reading.  When loading data into Application Server from a text file, you would normally go through three steps:
    1. Enter the ACCESS EXTERNAL subsystem
    2. Specify the name of the file to be read
    3. Specify the format of the file field names, types, widths, and positions.
    If you go into the Application Server help, select "Application Server Help", then "Application Server at the command level", then "Variables and reading in data", and then "Reading an external file", you will have the process of the steps you need to follow outlined for you, including links to the help topic for each command you need to issue.
    So what I think you need to do is use the DESCRIPTION command to specify the names of your fields, their type, and also their width, in order to ensure no truncation of data on the load.
    The same DESCRIPTION statement is required if you want to use your text file as the source of a dimension.
    Hope this helps,
    Robert

  • Adding data from a text file into a JTextArea

    I'm working on a blogging program and I need to add data from a text file named messages.txt into a JTextArea named messages. How do I go about doing this?

    then you need to be more specific in what you need help with because those are two commonly used options for reading data in from a file. what have you tried? where is your code failing? what kind of errors are you getting? of course it looks like others in the forum have already reprimanded you for failing to post properly.
    i have used both FileReader and the nio package for cfg and ini files which are both just txt files as well as massive data files. so tell me how they dont help you?

  • How to read some records from a text file into java(not all records)

    hello,
    how to read text files into java. i need only few records from the text file not all records at a time.
    If any one knows plz reply me
    my id is [email protected]

    this snipet reads a text file line by line from line 1 to 3
    try {
                  FileReader fr = new FileReader(directory);
                  BufferedReader br = new BufferedReader(fr);
                  int counter = 0;
                  while ((dbconn = br.readLine()) != null) {
                      switch(counter){
                          case 0:
                            status = dbconn;
                          break;
                          case 1:
                            userName = dbconn;
                          break;
                          case 2:
                            apword = dbconn;
                          break;
                      counter++;
                  br.close();
        }catch(IOException e){
        }

  • How to Add points on graph from a text File ?

    Hello and Good Morning to all,
    I have a text file with my data and i read them by using the Read From Spreadsheet File VI,i enter the path where my file is saved,read all rows delete the first row because i don't need it and my problem is that in the text folder i have specified date and time which i want to be my X axis in my Graph and Y axis to be the Vout that means i have to use a XY Graph ,below you can see my data:
    Date        time              Vout  
    3-9-2012 7:45:37            2,35
    3-9-2012 7:45:39            2,75
    3-9-2012 7:45:41            3,15
    3-9-2012 7:45:43            3,50
    1) Is the text file format compatible with the input of the graph command?
    I do not find a LabVIEW function which convert the “date” from the text file (example:3/09/2012 07:45:37) into a compatible format for X axis for the graph.
    (Conversion from string format => into a “date and time” format)
    Can someone please provide a code solution for this problem?

    Hi gstathatos,
                             See all the threads given below:-
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-XY-graph-with-time-step-not-constant/td-p/1507066
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-graph-from-a-text-File-Date-and-time-include-in/td-p/1...
                             http://forums.ni.com/t5/LabVIEW/read-double-waveform-text-file-and-and-plot-graph-in-labview/td-p/10...
    Thanks as kudos only

  • How to get shared date value from subreport to main report

    Hi,
    I need your help in passing the value of a running total that is located in the subreport to the main report. The running total in the subreport is getting the maximum of the Effective Date (which it is type in the database is date) for each group and it is value will change on the change of the sequence no. group. I am printing the value at the group footer which displayed correctly. Now my issue is that how to pass the value from the subreport to the main report as a date. I have created a formula that it is having the code:
    shared datevar ddd := date(0,0,0);
    ddd:={RTotl0}
    The above formula is not compiled and it is first giving me an error at line 1 that date(0,0,0) is not accepted. Then when I removed it, it gave me an error that ddd:= can't have a running total to a datevar.
    So can you please help in getting the value from the subreport and then to pass it to the main report as a formula as I need to include it in other formulas which it compares the dates.
    Thanks

    Hi Mohammed,
    Are you displaying the shared variable on the Main Report's group footer as well?
    Try changing the code to:
    shared datevar ddd := cdate(0,0,0);
    ddd:= date({RTotl0});
    -Abhilash

Maybe you are looking for

  • Adobe Photoshop CS2 Installing Error

    When I tried to Install for tryout version, it sometimes has an error. It says me to put the serial number in. Though it succeed it, it says like this : "Error 1311. Source file not found: C:\Documents and Settings\Administrator\Desktop\Photoshop_CS2

  • Scott schema not included in Oracle 12c?

    I just downloaded Oracle 12c however I noticed that there's no scott.sql in the oracle directories.. (/rdbms/admin/scott.sql) Tried downloading scott.sql and add but it wasn't added successfully as I checked for scott username from dba_users as said

  • Integer auto-increment fields

    I am using 3.0.3 and have a PC class that uses application identity and MSSQL server, so we are using auto-increment fields for our primary keys. In the past (with sequence-generated ids) we have used Integers for our mapped attributes, but with the

  • RMI concurrent processing of requests

    I have an RMI application which takes say 5 minutes to process a request from a client. Now if five clients concurrently access the server, the server process all the five requests within 5 minutes. This is perfectly fine. I'm using Sun jdk on my lap

  • What's with HP?

    What is up with HP. My support assistant says that there is a bios update. I tried to install it and it didn't install. Why are American Corporations so trusting [Moderator edited comment and PM Sent]! Anyways HP should be checking their work to make