SQL Loader problem while loading records from txt file to database table.
I am getting following error while loading records from flat txt file into database table with the help of 'sqlldr' command. I have executed catldr.sql from RDBMS folder but it is still showing same error. I am setting DIRECT = TRUE while issuing sqlldr command. If I try with DIRECT = FALSE then it works fine. Database is Oracle 8i.
SQL*Loader-951: Error calling once/load initialization
ORA-24329: invalid character set identifier
F1 Please.
Hello,
Direct path load, can only be used with SQL*Loader and Database have the same version.
Care to tell the database version and sql*loader version you are using.
-Sri
Similar Messages
-
i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g
hi TimoHahn,
i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
Root cause of ServletException.
java.lang.NullPointerException
at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
at java.util.ResourceBundle.getString(ResourceBundle.java:334)
at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) -
Upload .txt file into Database Table
Hi,
I was wondering if someone could please point me in the right direction. I've been looking around the forum but can't find anything to help me achieve the following.
I would like to be able to upload a .txt file using a webpage. Then store the information inside this file into database tables.
eg. contents of mytextfile.txt:
richard
10 anywhere street, anytown, somewhere
111 222 333 444
joe
9 somestreet, elsewhere
999 888 777 666
peter
214 nearby lane, overhere
555 555 555 555
I would like to insert this data into a table.
eg. table name = CONTACTS
userid = primary key (using sequence)
username = (line 1 - richard, joe, peter)
address = (line 2)
phone_no = (line 3)
As you can see the records will appear 1 at a time and will have a blank line between records. Is there anyway for me to upload a file like this and have it placed into tables?
I have seen http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html but this seems to be for uploading a whole file and downloading the same file, rather than extracting data from the file.
I hope I have managed to explain my problem.
Many thanks,
Richard.Richard,
HTML DB allows you to upload CSV files via the Data Workshop. That data would then be parsed and inserted into a specific table. Alternatively, if you have your data in an Excel spreadsheet, and it is less than 32k, you can copy & paste the data directly into HTML DB's Data Workshop, which will then parse and import it into the Oracle database.
The one obstacle you may have to overcome is converting your data from the format you outlined to CSV format. Specifically, you would have to make this:
richard
10 anywhere street, anytown, somewhere
111 222 333 444
Look something like this:
"richard","10 anywhere street, anytown, somewhere","111 222 333 444"
Hope this helps,
- Scott - -
How to extract data from text file to database table
Hi ,
I am trying to upload data in text file to database table using GUI_UPLOAD function .what would be the program for that.
thanks in advance.Hi,
I don't think you have a standard sap program to upload data from file to database table...
Instead you can create a custom program like this..
DATA: T_FILEDATA(1000) OCCURS 0 WITH HEADER LINE.
DATA: T_ZTABLE LIKE ZTABLE OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\TEST.TXT'
tables
data_tab = T_FILEDATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT T_FILEDATA.
T_ZTABLE = T_FILEDATA.
APPEND T_ZTABLE.
ENDLOOP.
MODIFY ZTABLE FROM TABLE T_ZTABLE.
COMMIT WORK..
Thanks,
Naren -
SQL Loader - want to access data from .txt file but don't want to insert
Hello,
I have situation where I have some data in .txt file and I have to load that data into one of my table.
My problem is I have fundtion get_id(a,b,c) in database which I have to call while loading the data to find out value of x.
I have value of a, b and c in txt file which I can access it using POSITION(N:M) in sql loader, but After accessing that value I just want to past to get_id() function and dont want to insert into sql loader.
any helpMy control file is as below
Following field is not in database but I need to pass the value to the function to get a ESC_USER_ID. any help
OFFICE_NUM filler POSITION(32:35) ,
STATION_DESK filler POSITION(45:48),
LOAD DATA
INFILE REFERRALs.TXT
BADFILE REFERRAL_LOAD.BAD
DISCARDFILE REFERRAL_LOAD.DIS
INSERT
INTO TABLE REFERRAL
EVALUATE CHECK_CONSTRAINTS REENABLE DISABLED_CONSTRAINTS
TRAILING NULLCOLS
ID sequence (1,1),
JOB_ID POSITION (16:22) "GET_JOB_ID(:JOB_ID)" ,
CUS_ID POSITION (23:31) "GET_CUS_ID(:CUS_ID)" ,
STATUS_LU CONSTANT 'F' ,
REQUEST_USER_TYPE_LU CONSTANT 'S' ,
OFFICE_NUM filler POSITION(32:35) ,
STATION_DESK filler POSITION(45:48),
REQUEST_USER_ID POSITION(143:149) "GET_ESCUSER_ID(OFFICE_NUM,STATION_DESK,:REQUEST_USER_ID)" ,
REQUEST_DT POSITION (37:44) "to_date(:REQUEST_DT,'YYYY/MM/DD')" ,
REVIEW_USER_ID FILLER ,
REVIEW_DT FILLER ,
REFUSE_REASON_LU FILLER ,
RESULT_LU POSITION (97:97) ,
NOTIFY_STATUS_LU FILLER ,
NOTIFY_DT FILLER ,
APPOINTMENT_DT POSITION (106:113) "to_date(:APPOINTMENT_DT,'YYYY/MM/DD')" ,
RESULT_DT POSITION (98:105) "to_date(:RESULT_DT,'YYYY/MM/DD')" ,
NO_MATCH_IND CONSTANT 'N'
) -
Loading records from .csv file to SAP table via SAP Program
Hi,
I have a .csv file with 132,869 records and I am trying to load it to an SAP table with a customized SAP program.
After executing the program, only 99,999 records are being loaded into the table.
Is there some setting to define how many records can be loaded into a table? Or what else could be the problem?
Pls advice.
Thanks!!!hi Arun ,
A datasource need a extract structure to fetch data .It is nothing but a temp table to hold data.
First you need to create atable in SE11 with fields coming from CSV file.
Then you need to write a report program to read you CSV file and populate your table in BW .
Then you can create a datasource on top of this table .
After that replicate and load data at PSA and use to upper flow.
Regards,
Jaya Tiwari -
Problem while storing items from trailing list to database
hi all,
can anyone help me out. i have scenario where i have to store items from trailing list into database. suppose if there are 3 items in the list, 3 rows should be inserted into database with all the remaining fields same like
A ,1 , c
A, 2, c
A , 3, c where 1,2,3 are items from trailing list. Am iterating the loop.
What am doing is before saving am checking for duplicates i.e are there any records with the same combination. If yes am doing nothing else am committing the changes..
As am not doing anything if any duplicte record is present, the changes made to the fields persists and once if any commit happens all the values are getting saved. which is voilating my condition..
ThanksHello,
Direct path load, can only be used with SQL*Loader and Database have the same version.
Care to tell the database version and sql*loader version you are using.
-Sri -
Problem while uploading data from flat file
hi friends,
suppose if there are 100 records in flat file , if 20 records uploaded with out any problem and if error occurs while uploading remaing data . is necessary to upload entire data again or else only remaining data should be uploaded?
i had used call transaction for purchase order application?
please give me reply soon its urgent
thanks & regards
priyaHi Hari,
you have to upload the remaining data.
as u have used CT method, do 1 thing trap the error data in runtime & prepare another flat file. next time correct the data in new flat file. & run the DBC program again with this new flat file.
Reward if useful
Regards
ANUPAM -
How to make this faster?? read millions of record from txt file
Hi there,
I got an issue. There is a txt file contains 2 million records, I also got another file contains over 10000 numbers. Now, I need to compare this 10000 numbers with that 2 million records if any records contains a number which belongs to 10000 number set, i retrieve this record and keep it. later on, when i finish the comparison i'll write all the result records into a txt file.
What kind of data structure shall i use to keep the records and numbers? how to make the comparison quicker? Any idea will do!
Thanks!if i were to do it, i will insert bout the records into the db. then do an sql statement on the two tables to get the results. Then get the rs and output it to another text file.
just my opinion. not sure if this is faster.
Message was edited by:
clarenceloh -
Sql query to bring single record from right side of a table
hi
I have two tables as below:
create table testsh1 ( idd varchar2(10), name varchar2(20));
create table testsh2 ( idd varchar2(10), balance float );
insert into testsh1 values('1','abc');
insert into testsh1 values('2','def');
insert into testsh1 values('3','ghi');
insert into testsh1 values('4','jkl');
insert into testsh1 values('4','jkl');
insert into testsh1 values('3','ghi');
insert into testsh2 values('1',500);
insert into testsh2 values('1',500);
insert into testsh2 values('3',1000);
insert into testsh2 values('3',1000);
insert into testsh2 values('4',1500);
insert into testsh2 values('4',1500);
insert into testsh2 values('1',500);
I am expecting the result below:
1 abc 500
2 def NULL
3 ghi 1000
3 ghi 1000
4 jkl 1500
4 jkl 1500
That is only records from testsh1 table can come as many times but from testsh2 only we need to bring unique and matching records on column idd.
Please help
ThanksHi Shavetha,
As the testsh2 has duplicates of each record, the DISTINCT of the record has to be record has to be applied.
Please Try this,
SELECT IDD, NAME, (SELECT DISTINCT BALANCE
FROM TESTSH2 B
WHERE B.IDD = A.IDD) BALANCE
FROM TESTSH1 A;Which Outputs:
IDD NAME BALANCE
1 abc 500
2 def
3 ghi 1000
4 jkl 1500
4 jkl 1500
3 ghi 1000Thanks,
Shankar -
Data Migration from CSV file to Database Table.
Hi,
I have checked few answered threads on Data Migration Issues but didn't find the solution yet.
I am reading data from an CSV file to internal table but the complete row is coming under one field of the internal table.
How i can get values in different fields of the internal table from the CSV file ?
Thanks & Regards.
Raman Khurana.Hi,
If you are using GUI_UPLOAD, you might have missed to make has_field_separator as 'X'.
EXPORTING
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\File.csv'
filetype = 'ASC'
has_field_separator = ' X' "<= Set this as 'X'.
TABLES
data_tab = itab.
Regards,
Manoj Kumar P -
SQL*Loader Problem while loading date from earlier era
Hi everybody,
I'm trying to load a date with SQL*Loader in Oracle 8.1.6. The value of the date is '11671102004338' with a date format 'YYYYMMDDHH24MISS'. Everytime I try it, I get the error message "ORA-01438: Wert größer als angegebene Stellenzahl für diese Spalte zuläßt" (meens: value is larger than the maximum length of the column). This is a little bit crazy, because the same works in SQL*Plus with the to_date function.
What I've to do?
Thanks in advance
RalfSorry, it's solved (I've to respect to correct type)
-
IE 6 giving the problems while downloading content from JSP File
Hi,
I am trying to download the file JSP, Blwo is the test code
<%
response.setContentType("application/csv");
response.setHeader("Content-Disposition", "filename=commissionData.csv;");
%>
This is test
This is test1
This is test2
When I try to load this file in IE 6, The error message comes like below
"Internet Explorer cannot download MyJsp.jsp from localhost.
Internet Explorer was not able to open this Internet site. The
requested site is either unavailable or cannot be found. Please try
again later."
Can anyone help me in this regards.
Thanks in advance
Shailesh S Deshpandeworks fine for me on Tomcat 4.
What server are you using?
Is it running? Try restarting it. -
Custom Pipeline component for Removing Trailer record from .txt file
public Microsoft.BizTalk.Message.Interop.IBaseMessage
Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pc,
Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
IBaseMessagePart bodyPart = inmsg.BodyPart;
Stream originalStrm = bodyPart.GetOriginalDataStream();
StreamReader sReader =
new StreamReader(originalStrm,
System.Text.Encoding.UTF8);
string sRecord = sReader.ReadToEnd();
MemoryStream memStream =
new MemoryStream();
StreamWriter sw =
new StreamWriter(memStream);
inmsg.BodyPart.Data
= memStream;
inmsg.BodyPart.Data.Position
= 0;
//"\r\n" is the delimeter for the the record
string[] separator
= new string[]
{ "\r\n" };
string[] strArray
= sRecord.Split(separator,
StringSplitOptions.None);
//Loop untill the last line (i.e ignore the trailer)
for (int n
= 1; n < strArray.Length; n++)
sw.Write((strArray[n
- 1] +
"\r\n"));
sw.Flush();
memStream.Flush();
memStream.Position
= 0;
inmsg.BodyPart.Data
= memStream;
inmsg.BodyPart.Data.Position
= 0;
return inmsg;
after Deploying and in Gac, when configuring Receive Pipeline, it shows no properties in Decode stage ?
MBHThere is nothing wrong with your code it removes the lastline, if there is no carriage return on it.
If your input file is like:
line1 <cr><lf>
line2 <cr><lf>
line3
The result is:
line1 <cr><lf>
line2 <cr><lf>
But if your input file is like:
line1 <cr><lf>
line2 <cr><lf>
line3 <cr><if>
The result is:
line1<cr><lf>
line2<cr><lf>
<empty line>
So when you have a carriage return on the last line, it results in an empty line, can this be the cause of your problem? -
Performance problem with selecting records from BSEG and KONV
Hi,
I am having performance problem while selecting records from BSEG and KONV table. As these two tables have large amount of data , they are taking lot of time . Can anyone help me in improving the performance . Thanks in advance .
Regards,
PrashantHi,
Some steps to improve performance
SOME STEPS USED TO IMPROVE UR PERFORMANCE:
1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
5. Avoid using nested SELECT statement SELECT within LOOPs.
6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
7. Avoid using SELECT * and Select only the required fields from the table.
8. Avoid nested loops when working with large internal tables.
9. Use assign instead of into in LOOPs for table types with large work areas
10. When in doubt call transaction SE30 and use the examples and check your code
11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
12. Use "CHECK" instead of IF/ENDIF whenever possible.
13. Use "CASE" instead of IF/ENDIF whenever possible.
14. Use "MOVE" with individual variable/field moves instead of "MOVE-
CORRESPONDING" creates more coding but is more effcient.
Maybe you are looking for
-
I cant create new events in iCal on my Mac or display them
Since a few days ago after upgrading to Lion when I want to create a new event it dosent show up in my calender. All the old events is shown and when I create an event for example on my iPhone and sync with iCal on my Mac I can see the new event. I c
-
How to read a ftp file with a specified file name in Proxy-XI-File scenario
Dear all, I have the following requirement: The end user send a request via the proxy to XI, within the request parameters there is a file name, and the XI need to retrieve the file content from a ftp server with this specified file name, how can I a
-
How to change Date format in Prompts.
Hi, How to change Date format to DD/MM/YYYY in Dashboard Prompts.Kindly let me know.
-
Hi All, When executing the 'Generate COGS Recognition Events' program in the cost managment responsibility, I am getting the below error message in the log message. This is regarding the IR ISO transaction. The error message is as below: CST_RevenueC
-
Missing tasks, memo pad & documents to gp
I have an unlocked Bold. Since receiving, I have not seen a tasks, memo pad OR Documents to go icon. I have checked the applications listing and checked for hidden folders, all to NO AVAIL. HELP!