Loading datas through sql loader
dear all,
I have a table with a date column where I have specified the datatype as date, and when am trying to load datas sqlloader :
Record 51: Rejected - Error on table SYSTEM.PROJECT, column D_DATE.
ORA-01843: not a valid month
select sysdate from dual
11/10/2007 1:53:55 PM -- which is of the format mm/dd/2007
am loading the datas in the same format even then, am getting the above error..
Here it is..
control file
LOAD DATA
infile *
INSERT
INTO TABLE system.project
FIELDS TERMINATED BY ','
(SERIAL,D_DATE date "DD-Mon-YY",PLATE_NO,IN_KM,OUT_KM,LOCATION,DESTINATION,LITERS,VEHICLE_TYPE,Division,REMARKS)
begindata
table structure :
SQL> desc project1
Name Null? Type
SERIAL NUMBER(10)
D_DATE DATE
PLATE_NO VARCHAR2(20)
IN_KM VARCHAR2(20)
OUT_KM VARCHAR2(20)
LOCATION VARCHAR2(20)
DESTINATION VARCHAR2(40)
LITERS NUMBER(10)
VEHICLE_TYPE VARCHAR2(40)
DIVISION VARCHAR2(40)
REMARKS VARCHAR2(40)
Please guide
Thanks sam.. I changed the control file like :
LOAD DATA
infile *
append
INTO TABLE system.project
FIELDS TERMINATED BY ','
(SERIAL,D_DATE date "DD-Mon-YY",REMARKS)
begindata
and now it is working fine..
Thanks
Yusuf
Similar Messages
-
Sql@loader-704 and ORA-12154: error messages when trying to load data with SQL Loader
I have a data base with two tables that is used by Apex 4.2. One table has 800,000 records . The other has 7 million records
The client recently upgraded from Apex 3.2 to Apex 4.2 . We exported/imported the data to the new location with no problems
The source of the data is an old mainframe system; I needed to make changes to the source data and then load the tables.
The first time I loaded the data i did it from a command line with SQL loader
Now when I try to load the data I get this message:
sql@loader-704 Internal error: ulconnect OCISERVERATTACH
ORA-12154: tns:could not resolve the connect identifier specified
I've searched for postings on these error message and they all seem to say that SQL Ldr can't find my TNSNAMES file.
I am able to connect and load data with SQL Developer; so SQL developer is able to find the TNSNAMES file
However SQL Developer will not let me load a file this big
I have also tried to load the file within Apex (SQL Workshop/ Utilities) but again, the file is too big.
So it seems like SQL Loader is the only option
I did find one post online that said to set an environment variable with the path to the TNSNAMES file, but that didn't work..
Not sure what else to try or where to look
thanksHi,
You must have more than one tnsnames file or multiple installations of oracle. What i suggest you do (as I'm sure will be mentioned in ed's link that you were already pointed at) is the following (* i assume you are on windows?)
open a command prompt
set TNS_ADMIN=PATH_TO_DIRECTOT_THAT_CONTAINS_CORRECT_TNSNAMES_FILE (i.e. something like set TNS_ADMIN=c:\oracle\network\admin)
This will tell oracle use the config files you find here and no others
then try sqlldr user/pass@db (in the same dos window)
see if that connects and let us know.
Cheers,
Harry
http://dbaharrison.blogspot.com -
Want to use sequence object of oracle when loading data in sql loader
Hi,
I want to use sequence when loading data in sqll loader, but the problem is i could not use sequence object of oracle to load the data by sql loader, i can use sequence of sql loader.
I want to use sequence object because in later entries this sequence object will be used.If i use sequence of sql loader how can i use oracle sequence object
Is there any other optionI have a simillar problem, I also want to use a sequence when loading data by the SQL Loader.
My control file is:
load data
infile '0testdata.txt'
into table robertl.tbltest
fields terminated by X'09'
trailing nullcols
(redbrojunos,
broj,
dolazak,
odlazak nullif odlazak=blanks,
komentar nullif komentar=blanks)
And the datafile is:
robertl.brojilo.nextval 1368 17.06.2003 08:02:46 17.06.2003 16:17:18
robertl.brojilo.nextval 2363 17.06.2003 08:18:18 17.06.2003 16:21:52
robertl.brojilo.nextval 7821 17.06.2003 08:29:22 17.06.2003 16:21:59
robertl.brojilo.nextval 0408 17.06.2003 11:20:27 17.06.2003 18:33:00 ispit
robertl.brojilo.nextval 1111 17.06.2003 11:30:58 17.06.2003 16:09:34 Odlazak na ispit
robertl.brojilo.nextval 6129 17.06.2003 14:02:42 17.06.2003 16:23:23 seminar
But all records were rejected by the Loader, for every record I get the error:
Record 1: Rejected - Error on table ROBERTL.TBLTEST, column REDBROJUNOS.
ORA-01722: invalid number -
Unable to load clob data through sql loader
Hi Experts ,
My ctl file is :
LOAD DATA infile '$di_top/conversion/devtrack_notes.csv'
truncate into table xxdi_proj
fields terminated by ','
optionally enclosed by '"'
trailing nullcols (bugid,note *clob*)
{code}
The problem is note column is a clob and one of the
values has line breaks like this :
{code}
Hi Sir,
Would you please inform when the reports are scheduled for automatic process?
Maria will stop his process to avoid duplication.
Please inform asap
With Regards ,
Ronaldinho
{code}
When the data gets loaded ,
The first column gets the sentence 'Would you please inform.....' i.e . the data of second columns gets loaded into first column as nulls are recognized as end delimiter.
How to overcome this problem?
ThanksPl post your exact OS and database versions, along with your complete sqlldr command, the table description and a sample of your input csv file.
HTH
Srini -
Hi Experts,
I have a file with the following format. I have to insert the data of those files in a table. I can use SQL Loader to load those files.
My question is I need to schedule the upload of those files. Can i incorporate sql loader in a procedure?
Agent Id|Agent Type|Create Date|Termination CDC|Activation CDC|Deactivation CDC|Agent IdX|Agent Status|Status Date|Status Reason Code|Update CDC|Update Serial|Update User|New Owner Agent Id|Previous Owner Agent Id|Agent Name|Primary Address1|Primary Address2|Primary Address3|Secondary Address1|Secondary Address2|Secondary Address3| Primary City|Primary State|Primary Zip|Primary Zip Suffix|Primary Country|Secondary City|Secondary State|Secondary Zip|Secondary Zip Suffix|Secondary Country|Phone Number|Fax number|Mobile Number|Business Type|Field Rep|Bill to Chain Id|Mon Open Time|Mon Close Time|Tue Open Time|Tue Close Time|Wed Open Time|Wed Close Time|Thu Open Time|Thu Close Time|Fri Open Time|Fri Close Time|Sat Open Time|Sat Close Time|Sun Open Time|Sun Close Time|Zone Id|Line Charge Class|Chain Id|Chain Code| Primary Contact Name| Primary Contact Title| Primary Contact Phone|Secondary Contact Name|Secondary Contact Title|Secondary Contact Phone|Tertiary contact Name|Tertiary Contact Title|Tertiary Contact Phone| Bank Id| Bank Account Id| bank Account Type| Bank Account Date| EFT Flag| Fund Limit|Invoicable|TaxCode|Tax Id|Sales Tax|Service Charge|Instant Cashing Type|Instant Telsel Rep| Instant Number of Bins| Instant Number Itvms| InstantCredit Limit|Auto Reorder| Instant Terminal Reorder| Instant Telsel Reorder| Instant Teleset Active CDC| Instant Initial Distribution|Auto Telsel Schedule| Instant Auto Settle| Instant Call Day| Instant Call Week| Instant Call Cycle| Instant Order Restriction| Instant Delivery Flag| Instant Account Type| Instant Settle Class| Region|County|Territory|Route|Chain Statement|Master Agent Id| Minority Owned| Tax Name| State Tax Id|Mailing Name| Bank Account Name| DSR
0|1|0|0|0|0|0|1|0|0|302|0|0|0|0|||||||||||||||||||||0|0|0|||||||||||||||0|0|0|||||||||||||0|-2145916800|0|0|0|0||0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0||0|0|0|||||
1|1|1256213087|0|-39081|-39081|1|2|1256213087|999|302|0|0|0|0|Pseudo Outlet||||||||MU|||MU||MU|||MU||||0|0|1|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|0|0|0|||||||||||||
{code)
Edited by: Kevin CK on 02-Feb-2010 03:28Yes sorry about that mishap
Agent Id|Agent Type|Create Date|Termination CDC|Activation CDC|Deactivation CDC|Agent IdX|Agent Status|Status Date|Status Reason Code|Update CDC|Update Serial|Update User|New Owner Agent Id|Previous Owner Agent Id|Agent Name|Primary Address1|Primary Address2|Primary Address3|Secondary Address1|Secondary Address2|Secondary Address3| Primary City|Primary State|Primary Zip|Primary Zip Suffix|Primary Country|Secondary City|Secondary State|Secondary Zip|Secondary Zip Suffix|Secondary Country|Phone Number|Fax number|Mobile Number|Business Type|Field Rep|Bill to Chain Id|Mon Open Time|Mon Close Time|Tue Open Time|Tue Close Time|Wed Open Time|Wed Close Time|Thu Open Time|Thu Close Time|Fri Open Time|Fri Close Time|Sat Open Time|Sat Close Time|Sun Open Time|Sun Close Time|Zone Id|Line Charge Class|Chain Id|Chain Code| Primary Contact Name| Primary Contact Title| Primary Contact Phone|Secondary Contact Name|Secondary Contact Title|Secondary Contact Phone|Tertiary contact Name|Tertiary Contact Title|Tertiary Contact Phone| Bank Id| Bank Account Id| bank Account Type| Bank Account Date| EFT Flag| Fund Limit|Invoicable|TaxCode|Tax Id|Sales Tax|Service Charge|Instant Cashing Type|Instant Telsel Rep| Instant Number of Bins| Instant Number Itvms| InstantCredit Limit|Auto Reorder| Instant Terminal Reorder| Instant Telsel Reorder| Instant Teleset Active CDC| Instant Initial Distribution|Auto Telsel Schedule| Instant Auto Settle| Instant Call Day| Instant Call Week| Instant Call Cycle| Instant Order Restriction| Instant Delivery Flag| Instant Account Type| Instant Settle Class| Region|County|Territory|Route|Chain Statement|Master Agent Id| Minority Owned| Tax Name| State Tax Id|Mailing Name| Bank Account Name| DSR
0|1|0|0|0|0|0|1|0|0|302|0|0|0|0|||||||||||||||||||||0|0|0|||||||||||||||0|0|0|||||||||||||0|-2145916800|0|0|0|0||0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0||0|0|0|||||
1|1|1256213087|0|-39081|-39081|1|2|1256213087|999|302|0|0|0|0|Pseudo Outlet||||||||MU|||MU||MU|||MU||||0|0|1|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|06:00|23:59|0|0|0|||||||||||||1|-2145916800|1|0|1|0||0|0|0|0|0|0|0|0|0|0|-3287|0|0|0|1|1|2|0|0|0|1|0|999|0||5|0|0|||||This is my file format which is a .txt file -
Error in loading data using SQL loader
I am getting a error like ‘SQL*Loader -350 syntax error of illegal combination of non-alphanumeric characters’ while loading a file using SQL loader in RHEL. The command used to run SQL*Loader is:
Sqlldr userid=<username>/<password> control =data.ctl
The control file, data.ctl is :
LOAD data
infile '/home/oraprod/data.txt'
append into table test
empid terminated by ',',
fname terminated by ',',
lname terminated by ',',
salary terminated by whitespace
The data.txt file is:
1,Kaushal,halani,5000
2,Chetan,halani,1000
I hope, my question is clear.
Please revert with the reply to my query.
RegardsReplace ''{" by "(" in your control file
LOAD data
infile 'c:\data.txt'
append into table emp_t
empid terminated by ',',
fname terminated by ',',
lname terminated by ',',
salary terminated by whitespace
C:\>sqlldr user/pwd@database control=c.ctl
SQL*Loader: Release 10.2.0.3.0 - Production on Wed Nov 13 10:10:24 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 1
Commit point reached - logical record count 2
SQL> select * from emp_t;
EMPID FNAME LNAME SALARY
1 Kaushal halani 5000
2 Chetan halani 1000
Best regards
Mohamed Houri -
Error while loading data using SQL*Loader
Hi All,
I am now in process of loading data from MS SQL to Oracle Database.
I am getting the data in excel format and i will convert them into csv.
Upto converting everything is working fine.
In MS SQL, table columns are case sensitive.
So i created those tables in oracle db as same.
There is one column "MaxNumber" which is of type float(49).
The column is case sensitive.
in the control file first i given as
"MaxNumber" "TO_NUMBER(:MaxNumber,'99,999.99')"
After executing the SQL*Loader i am getting the error
SQL*Loader-466: Column MAXNUMBER does not exist in table TABLEONE.
I changed the control file entry as
"MaxNumber" "TO_NUMBER(:"MaxNumber",'99,999.99')"
After the execution i got the error
SQL*Loader-350: Syntax error at line 13.
Expecting "," or ")", found "MaxDiscount".
"MaxNumber" "TO_NUMBER(:"MaxNumber",'99,999.99')"
Please Guide me in this issue.
Regards
Salih KMWhat I'm saying is, verify the column name. Dont post if not possible.
Example follows, with one table intentionally "hidden".
SQL> create table "tEsT" ("MaxNumber" float, "MaxnumbeR" number);
SQL> select table_name,column_name from user_tab_columns where table_name like 't%';
TABLE_NAME COLUMN_NAME
tEsT MaxNumber
tEsT MaxnumbeR
teST iD
teST MaxNumberHth,
Fredrik -
Loading data by sql loader in oracle 10g on linux
I am trying to load data in Oracle 10g on linux by using sql loader, but getting error
Problem in log showing that field length of SURNAME field is more than table field size.
Following is the error in log file of sql loader
Record 21: Rejected - Error on table TABLE1, column
SURNAME.
ORA-12899: value too large for column SURNAME (actual: 65, maximum: 64)
and it is evident from following controlfile that i am using trim to discard any space then why it is giving an error.
LOAD DATA
TRUNCATE
INTO TABLE TABLE1
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
ID INTEGER EXTERNAL,
OPTION1 CHAR,
REF1 CHAR,
OTHER_REF CHAR,
TITLE "TRIM(:TITLE)",
FORENAME "TRIM(:FORENAME)",
SURNAME "TRIM(:SURNAME)",
JOINT_TITLE "TRIM(:JOINT_TITLE)",
JOINT_FORENAME "TRIM(:JOINT_FORENAME)",
JOINT_SURNAME "TRIM(:JOINT_SURNAME)",
I checked the bad file and count number of characters, they are 64 characters.
When i am inserting individual record from bad file by sql loader, it is loadingProbably your database character set is multi-byte. That is %UTF8 or AL16UTF16%
Post your NLS Database Parameters value
select * from nls_database_parameters;
In General varchar2(65) by default means 65 BYTES unless
you have changed your Defalut NLS_LENGTH_SEMANTICS parameter from BYTE to CHAR.
With best regards
Shan -
Problem with loading data using SQL LOADER
I am having following files with me when i run following command at command prompt
sqlldr scott/tiger@genuat control =c:\emp.ctl
then giving error as
SQL Loader 500: unable to open file
SQL Loader 553: file not found
emp.dat file data
1111,sneha,CLERK 7902,17-Dec-80,800,20
2222,manoj,SALESMAN,7698,20-Feb-72 ,1600,6500,30
3333,sheela,MANAGER,7839,8-Apr-81,2975,20
emp.ctl file
LOAD DATA
INFILE 'c:\emp.dat'
APPEND
INTO TABLE emp
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(EMPNO,
ENAME ,
JOB,
MGR,
HIREDATE,
SAL ,
COMM,
DEPTNO)
can anyone tell me what is problem in above file why data is not loaded in table??I don't find any problem if you invoke the SQLLDR using the below command(and if you are certain that the control file resides in the C: drive).
sqlldr scott/tiger@genuat control =c:\emp.ctl
If this doesn't work then invoke the SQLLDR from the C: prompt itself.
sqlldr scott/tiger@genuat control=emp.ctl
It would locate the control file and check whether the sqlldr completes successfully? -
hi.,
By SQL LOADER iam able to Transfer data to Oracle Database, from a Flat File System.
But now i want to Transfter the data from Flat Files, to Oracle Apps/VB/D2k Etc.,
with help of SQL Loader.,
is it possible to do..?
Thanks in Advance,
With Regards.,
N.GowriShankar.For the Applications you can use file handling built-ins such as TEXT_IO, UTL_FILE, etc. You can write a batch program for sqlldr and can invoke it from front end Applications.
-
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,
AttilioWith '?' mark i mean " How i can link this COL1 with column in csv file ? "
Attilio -
Tutorials on loading data with SQL LOADER
Dear reader
Pls i need tutorials on how to use SQL LOADER as well as a software for loading data into oracle softwarehttp://download.oracle.com/docs/cd/B19306_01/server.102/b14215/toc.htm
Chapters 6-14 are filled with examples and tutorials -
Unable to load data through outline load utility
I am unable to load data by using outline load utility.
Assigned Data load dimension as: Account
Driver Dimension as : Period
Driver member as : Jan
Login file:
Account,Jan,Point-of-View,Data Load Cube Name
Investment,1234,"India,Current,Drat,FY13",Plan1
Command at Outline utility
OutlineLoad /A:pract /U:admin /I:C:\test1.csv /D:Account /L:C:\lg.log /X:C:\ex.exc
Exception file
[Thu Mar 28 18:05:39 GMT+05:30 2013] Error occurred loading data record 1: Investments,1234,"""India,Current,Draft,FY14""",Plan1
[Thu Mar 28 18:05:39 GMT+05:30 2013] com.hyperion.planning.InvalidMemberException: The member India,Current,Draft,FY14 does not exist or you do not have access to it.
[Thu Mar 28 18:05:40 GMT+05:30 2013]Planning Outline data store load process finished with exceptions: exceptions occured, examine the exception file for more information. 1 data record was read, 1 data record was processed, 0 were successfully loaded, 1 was rejected.
Logfile:
Successfully logged into "pract" application, Release 11.113, Adapter Interface Version 5, Workforce supported and not enabled, CapEx not supported and not enabled, CSS Version 3
[Thu Mar 28 18:05:38 GMT+05:30 2013]Successfully located and opened input file "C:\load.csv".
[Thu Mar 28 18:05:38 GMT+05:30 2013]Header record fields: Account, Jan, Point-of-View, Data Load Cube Name
[Thu Mar 28 18:05:38 GMT+05:30 2013]Located and using "Account" dimension for loading data in "pract" application.
[Thu Mar 28 18:05:40 GMT+05:30 2013]Load dimension "Account" has been unlocked successfully.
[Thu Mar 28 18:05:40 GMT+05:30 2013]A cube refresh operation will not be performed.
[Thu Mar 28 18:05:40 GMT+05:30 2013]Create security filters operation will not be performed.
[Thu Mar 28 18:05:40 GMT+05:30 2013]Examine the Essbase log files for status if Essbase data was loaded.
[Thu Mar 28 18:05:40 GMT+05:30 2013]Planning Outline data store load process finished with exceptions: exceptions occured, examine the exception file for more information. 1 data record was read, 1 data record was processed, 0 were successfully loaded, 1 was rejected.
Infact those members exist in the Outline.
Any help would be appreciated.Check for the double quotes (the one John mentioned). Also I can see that you are taking the approach of Data Load dimension. Is Data load dimension and driver members defined correctly in Planning?
Regards
Celvin
http://www.orahyplabs.com
Please mark the answers as helpful/correct if applicable -
Help needed to load data using sql loader.
Hi,
I trying to load data from xls to oracle table(solaris OS) and its failing to load data.
Control file:
LOAD DATA
CHARACTERSET UTF16
BYTEORDER BIG ENDIAN
INFILE cost.csv
BADFILE consolidate.bad
DISCARDFILE Sybase_inventory.dis
INSERT
INTO TABLE FIT_UNIX_NT_SERVER_COSTS
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
HOST_NM,
SERVICE_9071_DOLLAR DOUBLE,
SERVICE_9310_DOLLAR DOUBLE,
SERVICE_9700_DOLLAR DOUBLE,
SERVICE_9701_DOLLAR DOUBLE,
SERVICE_9710_DOLLAR DOUBLE,
SERVICE_9711_DOLLAR DOUBLE,
SERVICE_9712_DOLLAR DOUBLE,
SERVICE_9713_DOLLAR DOUBLE,
SERVICE_9720_DOLLAR DOUBLE,
SERVICE_9721_DOLLAR DOUBLE,
SERVICE_9730_DOLLAR DOUBLE,
SERVICE_9731_DOLLAR DOUBLE,
SERVICE_9750_DOLLAR DOUBLE,
SERVICE_9751_DOLLAR DOUBLE,
GRAND_TOTAL DOUBLE
Log file:
Table FIT_UNIX_NT_SERVER_COSTS, loaded from every logical record.
Insert option in effect for this table: INSERT
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
HOST_NM FIRST * , CHARACTER
SERVICE_9071_DOLLAR NEXT 8 DOUBLE
SERVICE_9310_DOLLAR NEXT 8 DOUBLE
SERVICE_9700_DOLLAR NEXT 8 DOUBLE
SERVICE_9701_DOLLAR NEXT 8 DOUBLE
SERVICE_9710_DOLLAR NEXT 8 DOUBLE
SERVICE_9711_DOLLAR NEXT 8 DOUBLE
SERVICE_9712_DOLLAR NEXT 8 DOUBLE
SERVICE_9713_DOLLAR NEXT 8 DOUBLE
SERVICE_9720_DOLLAR NEXT 8 DOUBLE
SERVICE_9721_DOLLAR NEXT 8 DOUBLE
SERVICE_9730_DOLLAR NEXT 8 DOUBLE
SERVICE_9731_DOLLAR NEXT 8 DOUBLE
SERVICE_9750_DOLLAR NEXT 8 DOUBLE
SERVICE_9751_DOLLAR NEXT 8 DOUBLE
GRAND_TOTAL NEXT 8 DOUBLE
Record 1: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column HOST_NM.
Field in data file exceeds maximum length
Table FIT_UNIX_NT_SERVER_COSTS:
0 Rows successfully loaded.
1 Row 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.
Please help me ASAP.
Awaiting u r reply.Hi,
I verified and everything looks fine according to me.
Table structure:
OST_NM VARCHAR2(30)
SERVICE_9071_DOLLAR NUMBER(8,2)
SERVICE_9310_DOLLAR NUMBER(8,2)
SERVICE_9700_DOLLAR NUMBER(8,2)
SERVICE_9701_DOLLAR NUMBER(8,2)
SERVICE_9710_DOLLAR NUMBER(8,2)
SERVICE_9711_DOLLAR NUMBER(8,2)
SERVICE_9712_DOLLAR NUMBER(8,2)
SERVICE_9713_DOLLAR NUMBER(8,2)
SERVICE_9720_DOLLAR NUMBER(8,2)
SERVICE_9721_DOLLAR NUMBER(8,2)
SERVICE_9730_DOLLAR NUMBER(8,2)
SERVICE_9731_DOLLAR NUMBER(8,2)
SERVICE_9750_DOLLAR NUMBER(8,2)
SERVICE_9751_DOLLAR NUMBER(8,2)
GRAND_TOTAL NUMBER(8,2)
Control file:
LOAD DATA
BYTEORDER BIG ENDIAN
INFILE cost.csv
BADFILE consolidate.bad
DISCARDFILE Sybase_inventory.dis
INSERT
INTO TABLE FIT_UNIX_NT_SERVER_COSTS
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
HOST_NM ,
SERVICE_9071_DOLLAR NUMBER(8,2),
SERVICE_9310_DOLLAR NUMBER(8,2),
SERVICE_9700_DOLLAR NUMBER(8,2),
SERVICE_9701_DOLLAR NUMBER(8,2),
SERVICE_9710_DOLLAR NUMBER(8,2),
SERVICE_9711_DOLLAR NUMBER(8,2),
SERVICE_9712_DOLLAR NUMBER(8,2),
SERVICE_9713_DOLLAR NUMBER(8,2),
SERVICE_9720_DOLLAR NUMBER(8,2),
SERVICE_9721_DOLLAR NUMBER(8,2),
SERVICE_9730_DOLLAR NUMBER(8,2),
SERVICE_9731_DOLLAR NUMBER(8,2),
SERVICE_9750_DOLLAR NUMBER(8,2),
SERVICE_9751_DOLLAR NUMBER(8,2),
GRAND_TOTAL NUMBER(8,2)
Sample date file:
ABOS12,122.46,,1315.00,,1400.00,,,,,,,,1855.62,,4693.07
ABOS39,6391.16,,1315.00,,1400.00,,,,,,,,,4081.88,13188.04 -
Loading data through pl/sql
Hi frnds,
i want to load .mdb table into oracle 9i through pl/sql procedure.
i am doing this through sql* loader
my script is :
LOAD DATA INFILE '//empwrpub1/Data_Wrangler/Owens/Original Data/037 Refresh 10-06/SAP/SRM_INVOICE.txt'
INTO TABLE SRM_INVOICE_200610
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES
now i want this through pl/sql procedure
thanks in advanceHi,
The two different questions have arised during this Forum.
1. Load data through SQL loader from PL/SQL.
2. Use of many DDL and DML statements in the process of Data Loading.
I will start from the second Question :
this is great question I myself has faced this problem like first create temporary tables load data, update spaces with null or date formatting etc.
This is easily achieved when you load the data by using External Tables. There you need to write a script mentioning your datafile, location, column and line termination etc. In this same script you use your DDL statements first and then data loading script and there after DML if any.
This block would look like something PL/SQL block.
So, First questioin has also been answered with the condition that you have to use External tables and then load data by writing PL/SQL. I am not sure as I have never tried to call SQL loader commands from PL/SQL. So it Looks impossible. If at all you want to carry out the same activity from PL/SQL block then write a SQL loader Script, CTL file and then write a SHELL Program and then call it from PL/SQL Block.
Bye
Maybe you are looking for
-
How to Change Default Title and Icon of Forms 5.0 Runtime
Whenever i run Forms 5.0 runtime , it always shows 'Developer 2000 Forms Runtime for Windows 95/ NT'. If i set a title to the main window then also the above message preceeds my Title of Window. Is there any way to remove that ???? My Application is
-
Problems when using absolute() on Oracle JDBC driver
Hi all, I wrote some codes using JDBC to access a remote Oracle server. After got the resultset, I attempted to use absolute() method to move to a specific row index and got an error. Could anyone please help me to find out the cause and the solution
-
I want to exchange my apple gift card to itune card
I want to exchange my 25$ apple gift card to itune card please leave massage
-
I find that the older version of Dreamweaver (CS3) works best for me.
I have used all new updated versions of Adobe Dreamweaver. Usually an update would make things easier for me but in this case it is the complete opposite. Don't get me wrong, Dreamweaver is still my primary choice for developing a website. I just fin
-
Ping Failed - Sun Application Server 8
My Sun Application server can not start - It has started O.K. for a couple months. I seem to have a domain.xml issue. The log shows this error: java.util.logging.ErrorManager: 0: Error In getLogService java.util.logging.ErrorManager: 0: Error In getL