Removing Double Quotes while uploading CSV file in APEX
Whenever I upload a CSV file using data load option in APEX there are values which get uploaded in Double Quotes.
e.g Oracle Polska Sp. z o.o -----------value like this gets uploaded with Double Quotes."Oracle Polska Sp. z o.o"
How can I overcome this problem? I am using Apex 4.2.
Did you specify the "Optionally Enclosed By" option with the double quote sign?
Similar Messages
-
To remove Double quotes while uploading a file
Hi All,
I have a requirement, where i have to Remove double quotes after uploading a file.
I am uploading the file using GUI_UPLOAD.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
FILETYPE = 'ASC'
has_field_separator = '"'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = it_tab
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 it_tab INTO wa_tab.
TRANSLATE wa_tab-line USING '" '.
SHIFT wa_tab-line LEFT DELETING LEADING space.
MODIFY it_tab FROM wa_tab.
CLEAR wa_tab.
ENDLOOP.
The above logic is replacing '"' with a blank space. I dont want this blank space which is generated. The double quote should be removed and the next character should shift to left in place of Double quote.
Note : I am on 4.6C and it doesnt have replace all occurrences of.
How to achieve this ?
Thanks in advance,
Best regards,
PrashantHi Prashant ,
There is one simple method for it . When you find <b>"</b> in you table , you shift the previous data into other tab (table2) . Continue searching and when you get next <b>"</b> again shift the data to table2 .
Hope this helps .
Edit : If you dont want to use another table , you can use function TRIM . To know more about it click
<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/a8/2afd3f2d14e869e10000000a155106/content.htm">TRIM</a>
Message was edited by: Shounak M
Regards ,
Shounak M.
Message was edited by: Shounak M -
Negative Numbers considered as VARCHAR while uploading CSV file under Data Load in APEX
I am trying to upload a CSV file which contains negative numbers. These negative numbers are being considered as VARCHAR2 while uploading. And if I change the Column Type to Numbers the upload fails.
Any solutions the problem will highly be appreciated.select * from nls_database_parameters
where parameter = 'NLS_NUMERIC_CHARACTERS'
shows you which characters your database believes represent the decimal place and the thousands separator. So, if your database expects 1,234.123 and you present a 'number' as 1 234,123 it will complain.
Also, in your case... your comma-separated-values contain commas? Or are the individual fields enclosed with quotes? -
Getting Issue while uploading CSV file into internal table
Hi,
CSV file Data format as below
a b c d e f
2.01E14 29-Sep-08 13:44:19 2.01E14 SELL T+1
actual values of column A is 201000000000000
and columen D is 201000000035690
I am uploading above said CSV file into internal table using
the below coding:
TYPES: BEGIN OF TY_INTERN.
INCLUDE STRUCTURE KCDE_CELLS.
TYPES: END OF TY_INTERN.
CALL FUNCTION 'KCD_CSV_FILE_TO_INTERN_CONVERT'
EXPORTING
I_FILENAME = P_FILE
I_SEPARATOR = ','
TABLES
E_INTERN = T_INTERN
EXCEPTIONS
UPLOAD_CSV = 1
UPLOAD_FILETYPE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
am getting all columns data into internal table,
getting problem is columan A & D. am getting values into internal table for both; 2.01E+14. How to get actual values without modifying the csv file format.
waiting for your reply...
thanks & regards,
abhiHi Saurabh,
Thanks for your reply.
even i can't double click on those columns.
b'se the program needs be executed in background there can lot of csv file in one folder. No manual interaction on those csv files.
regards,
abhi -
Double quotes missing in CSV file but exist in text file from AL11
Hi I am sending a file to AL11 with one of the fields having double quotes Like "field value" . When i download into Text file i am seeing the quotes but not when download as CSV file from Al11. Any SAP notes for this . If i add multiple quotes ' """" ' to have in csv I am seeing more quotes in text file which is not accepted . Please reply if anyone worked on this before . Thanks Kamesh
The CSV file also has the quotes (check in notepad), but when opened in MS Excel, Excel has a feature to ignore double quotes and consider the comma inside the quotes as part of field, not as a field separator.
-
How to handle comma present in any filed while loading CSV file in APEX
I am trying to import excel sheet data into a table. I have followed steps mentioned in below link and they work just fine with one exception.
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Exception is related to presense of comma (,) in any particular filed like- Address.
How can I handle this situation? I am using APEX 3.2
Thanks,
AbhiYes this is correct.
but problem will occur when e.g check the foll. string.
(1001,And I quote "This, will work")
Here it is a comm(,) in b/w "This and will".
due to this sqlldr interpret it as end of field. and throws an error.
I had gone through expert one on one oracle, what it maintioned as,
put an extra double quotes( " ) like " " to enclosed the double quoted string.
This works fine. For small data it can be done manually.
But for large data what condition can be put in the ctl file to achieve this?
or is there any other way to achieve this?
Thank you. -
How to handle comma while importing CSV file in APEX 3.2
I am trying to import excel sheet data into a table. I have followed steps mentioned in below link and they work just fine with one exception.
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Exception is related to presense of comma (,) in any particular filed like- Address.
How can I handle this situation? I am using APEX 3.2
Thanks,
AbhiWrong forum.
You should be here.
Oracle Application Express (APEX) -
Runtime error in KEFC Transaction while uploading CSV format file
Hi Experts,
This is regarding Runtime Error while executing the KEFC transaction in R3D.
It is working successfully while uploading the file in Text format. But there is run time error while uploading in CSV format.
It showing "The transfer was terminated.However,content errors occured" .
Please provide the solution.
Thanks in advance.
Regards,
Priya.Hi,
To upload a CSV file it is used FM:
CALL FUNCTION 'TEXT_CONVERT_CSV_TO_SAP'
EXPORTING
i_field_seperator = ';'
I_LINE_HEADER =
i_tab_raw_data = lt_file
i_filename = p_filename
TABLES
i_tab_converted_data = p_table
EXCEPTIONS
conversion_failed = 1
OTHERS = 2
Please check what separetor this fm and your file are using. It should be the same.
Regards,
Fernando -
How to upload .CSV file from Application Server
Hi Experts,
How to upload .CSV file separated by ',' from Application server to an internal table.
Invoice No,Cust No,Item Type,Invoice Date,days,Discount Amount,Gross Amount,Sales Amount,Customer Order No.,Group,Pay Terms
546162,3233,1,9/4/2007,11,26.79,5358.75,5358.75,11264,HRS,11
546163,2645,1,9/4/2007,11,3.07,305.25,305.25,10781,C,11
Actually I read some already answered posts. But still I have some doubts.
Can anybody please send me the code.
Thanks in Advance.Hi Priya,
Check this code
Yhe logic used here is as follows,
Get all the data into an internal table in the simple format ie: a row with one field contains an entire line
After getting the data, we split each line of the table on every occurrence of the delimiter (comma in your case)
Here, I have named the fields as field01, field02 etc, you could use your own names according to your requirement
parameters: p_file(512).
DATA : BEGIN OF ITAB OCCURS 0,
COL1(1024) TYPE C,
END OF ITAB,
WA_ITAB LIKE LINE OF ITAB.
DATA: BEGIN OF ITAB_2 OCCURS 0,
FIELD01(256),
FIELD02(256),
FIELD03(256),
FIELD04(256),
FIELD05(256),
FIELD06(256),
FIELD07(256),
FIELD08(256),
FIELD09(256),
FIELD10(256),
FIELD11(256),
FIELD12(256),
FIELD13(256),
FIELD14(256),
FIELD15(256),
FIELD16(256),
END OF ITAB_2.
DATA: WA_2 LIKE LINE OF ITAB_2.
OPEN DATASET p_FILE FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.
IF SY-SUBRC = 8.
WRITE:/ 'File' , p_FILE , 'cannot be opened'.
LV_LEAVEPGM = 'X'.
EXIT.
ENDIF.
WHILE SY-SUBRC <> 4.
READ DATASET p_FILE INTO WA_ITAB.
APPEND WA_ITAB TO ITAB.
ENDWHILE.
CLOSE DATASET p_FILE.
LOOP AT ITAB INTO WA_ITAB.
SPLIT WA_ITAB-COL1 AT ',' " where comma is ur demiliter
INTO WA_2-FIELD01 WA_2-FIELD02 WA_2-FIELD03 WA_2-FIELD04
WA_2-FIELD05 WA_2-FIELD06 WA_2-FIELD07 WA_2-FIELD08 WA_2-FIELD09
WA_2-FIELD10 WA_2-FIELD11 WA_2-FIELD12 WA_2-FIELD13 WA_2-FIELD14
WA_2-FIELD15 WA_2-FIELD16.
APPEND WA_2 TO ITAB_2.
CLEAR WA_2.
ENDLOOP.
Message was edited by:
Kris Donald -
Uploading csv file into database using apex
Dear all
I am using apex 4 and oracle express 10g, i need to upload .csv file into the database for one of my appls, i have referred discussion forum for solutions, i found also, but some how its not working for me.
below mentioned is error and the code
ERROR:
ORA-06550: line 38, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 38, column 8: PL/SQL: Statement ignored ORA-06550: line 39, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 39, column 8: PL/SQL: Statement ignored ORA-06550: line 40, column 8: PLS-00221: 'V_DATA_ARRAY' is not a procedure or is undefined ORA-06550: line 40, column 8: PL/SQL: Statement ignored ORA-06550: line 41, column 8: PLS-00221: 'V_DATA_ARRAY' is not a proc
Error
OK
CODE:
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len number := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array wwv_flow_global.vc_arr2;
BEGIN
-- Read data from wwv_flow_files
select blob_content into v_blob_data
from wwv_flow_files where filename = 'DDNEW.csv';
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- Read and convert binary to char
WHILE ( v_position <= v_blob_len ) LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
-- Convert comma to : to use wwv_flow_utilities
v_line := REPLACE (v_line, ',', ':');
-- Convert each column separated by : into array of data
v_data_array := wwv_flow_utilities.string_to_table (v_line);
-- Insert data into target table
EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
USING
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4);
v_data_array(5);
v_data_array(6);
v_data_array(7);
v_data_array(8);
v_data_array(9);
v_data_array(10);
v_data_array(11);
-- Clear out
v_line := NULL;
END IF;
END LOOP;
END;
what i understand from this is system does not identify v_data_array as array for some reasons, please help me.
initially system was giving error for hex_to_decimal, but i managed to get this function on discussion forum and now it seems to be ok. but v_data_array problem is still there.
thanks in advance
regards
UdayHi,
Mistakes in your sample I did correct
Problem 1
select blob_content into v_blob_data
from wwv_flow_files where filename = 'DDNEW.csv'; to
select blob_content into v_blob_data
from wwv_flow_files where name = :P1_FILE;Problem 2
EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
USING
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4);
v_data_array(5);
v_data_array(6);
v_data_array(7);
v_data_array(8);
v_data_array(9);
v_data_array(10);
v_data_array(11); to
EXECUTE IMMEDIATE 'insert into TABLE_X (v1, v2, v3, v4 ,v5, v6, v7,v8 ,v9, v10, v11)
values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)'
USING
v_data_array(1),
v_data_array(2),
v_data_array(3),
v_data_array(4),
v_data_array(5),
v_data_array(6),
v_data_array(7),
v_data_array(8),
v_data_array(9),
v_data_array(10),
v_data_array(11); And I did create missing table
CREATE TABLE TABLE_X
v1 VARCHAR2(255),
v2 VARCHAR2(255),
v3 VARCHAR2(255),
v4 VARCHAR2(255),
v5 VARCHAR2(255),
v6 VARCHAR2(255),
v7 VARCHAR2(255),
v8 VARCHAR2(255),
v9 VARCHAR2(255),
v10 VARCHAR2(255),
v11 VARCHAR2(255)
);Regards,
Jari
Edited by: jarola on Nov 19, 2010 3:03 PM -
Issue when I upload CSV file for insert contact list on Cisco Attendant Console Advanced
Hi Friends,
I have error "Provided file is not valid CSV File" when I upload CSV file to Cisco Attendant Console Advanced system. I'm not sure what happen about my CSV. My purpose is insert contact list to system and create CSV base on documentation.
Anyone have idea to solve this issue please kindly help me.
ThanksYou are right, whenever Cisco device boots, the IOS files gets loaded on the DRAM.
But in this process, some temporary files are also generated which gets saved in the flash/Disk, that’s the only reason you got these error messages. It’s not recommended at all to have less space in the Flash than what is recommended on Cisco.com. I would say please remove some files from Disk and have minimum 256 MB flash otherwise your router may drop into rommon mode at the time of next reload.
Well, it’s good to upgrade the bootstarp image too. Currently you are running 15.X IOS code, I would say run 15.X bootstarp image on the box.
You may download bootstarp image for 7206VRX NPEG2 from the link below:-
http://software.cisco.com/download/release.html?mdfid=282188585&flowid=1380&softwareid=280805685&release=15.2.4S4&relind=AVAILABLE&rellifecycle=ED&reltype=latest
If you want to know the procedure of the upgrade, click the link mentioned below:-
http://www.cisco.com/en/US/docs/ios/12_2/configfun/command/reference/frf010.html#wp1017654
-Amant -
How to give the unix server path while uploading a file
Hi All,
Am very new to this file operations in Oracle.
here i have a requirement like we need to upload table to unix server using oracle. I have read about File operations in Oracle but in that i did not understand one point like how and where to give the unix server path .. like username@servername and Path where that file needs to be stored.
I have googled for file operations in oracle.. in that there are asking me to create one object like as follows
Create or replace directory rtvms2 as 'MYDIR:'
The MYDIR: i need to use while uploading the file .
UTL_FILE.FOPEN('MYDIR:','Report.txt','W');
My Question is how and where should i give my unix server information .?
and how and in which step oracle connect to unix server and upload the file.?
Can any one please help me.
Thanks
Sreeyou're close...
(this example shows it for a windows server, but you just replace the windows directory path with a unix server path)
CREATE OR REPLACE DIRECTORY mydir AS 'c:\myfiles';Note: This does not create the directory on the file system. You have to do that yourself and ensure that oracle has permission to read/write to that file system directory.
Then, grant permission to the users who require access e.g....
GRANT READ,WRITE ON DIRECTORY mydir TO myuser;Then use that directory object inside your FOPEN statement e.g.
fh := UTL_FILE.FOPEN('MYDIR', 'myfile.txt', 'r');Note: You MUST specify the directory object name in quotes and in UPPER case for this to work as it is a string that is referring to a database object name which will have been stored in uppercase by default.
For security reasons, Oracle requires a directory object and it is that object that points to the actual path (it's up to you to make sure that path is valid and exists on the operating system). Then the object can have read and write permissions given to relevant database users as appropriate i.e. you may want one user to only be able to read files from that location whilst another user can read and write. You still need to ensure operating system level permissions exist for that path for the operating system user under which oracle was installed (on unix that's likely to be an "oracle" user). -
UCCX 8.0 "Error while uploading the file. Please try again."
I was on UCCX version 8.0.2.11003-10 and i was able to upload an script with the same name as an old one (overwrite).
Upgrade to UCCX 8.0.2.11004-12 and now I am receiving the error: "Error while uploading the file. Please try again."
There was a bug CSCth09248 that affected version 7 but supposed to be fixed on version 8 and was fixed on an earlier version. But after moving to a minor patch, problem came back...
Any ideas?Hi,
I belive the bug was initially opened to fix the issue when uploading script fails when using wizard to configure uccx.
But now they have re-opened the same bug instead of opened a new one for the issue that you have.
I looked at the case attached to that bug, case # 617145545. Below is the problem description that customer has which is same as yours and this bug has been re-opened to fix this particular problem.
When I tried to upload a modified script with an existing file name, the message "script file already exists.
Overwrite existing script file, continue?" comes up and when I select "OK" then,
it dispaly Status "Error while uploading the file. Please try again".
If I remove an existing file first, it will upload fine.
Using UCCX Admin 8.0.2.11004-12 and UCCX Editor 8.0(2.0).
Thanks
Ankita -
Error while uploading the file from Allpcation server in LSMW-7th step
Hi Experts,
what should be the specific CODE PAGE should be maintained while uploading the file from application server in LSMW-7th Step
Thanks in advance,
KSRHi
I mean that there is any seperate CODE PAGE which comes at the bottom of screen while uploading the file from the application server in 7th step.
Is there any specific CODE PAGE to be maintained...
Thanks in advance
Oarsk -
Getting error while uploading multiple files in sharepoint hosted app in 2013 with REST API
Hi All,
In one of my tasks, I was struck with one issue, that is "While uploading multiple files into custom list with REST API".
Iam trying to upload multiple files in library with REST calls for an APP development, my issue is if i wants to upload 4 image at once its storing only
3 image file and further giving "Conflict" error". Below is the attached screenshot of exact error.
Error within screenshot are : status Code : 409
status Text :conflict
For this operation i am uploading different files as an attachment to an list item, below is the code used for uploading multiple files.
my code is
function PerformUpload(listName, fileName, listItem, fileData)
var urlOfAttachment="";
// var itemId = listItem.get_id();
urlOfAttachment = appWebUrl + "/_api/web/lists/GetByTitle('" + listName + "')/items(" + listItem + ")/AttachmentFiles/add(FileName='" + fileName + "')"
// use the request executor (cross domain library) to perform the upload
var reqExecutor = new SP.RequestExecutor(appWebUrl);
reqExecutor.executeAsync({
url: urlOfAttachment,
method: "POST",
headers: {
"Accept": "application/json; odata=verbose",
"X-RequestDigest": digest
contentType: "application/json;odata=verbose",
binaryStringRequestBody: true,
body: fileData,
success: function (x, y, z) {
alert("Success!");
error: function (x, y, z) {
alert(z);Hi,
THis is common issue if your file size exceeds
upload a document of size more than 1mb. worksss well for kb files.
https://social.technet.microsoft.com/Forums/office/en-US/b888ac78-eb4e-4653-b69d-1917c84cc777/getting-error-while-uploading-multiple-files-in-sharepoint-hosted-app-in-2013-with-rest-api?forum=sharepointdevelopment
or try the below method
https://social.technet.microsoft.com/Forums/office/en-US/40b0cb04-1fbb-4639-96f3-a95fe3bdbd78/upload-files-using-rest-api-in-sharepoint-2013?forum=sharepointdevelopment
Please remember to click 'Mark as Answer' on the answer if it helps you
Maybe you are looking for
-
How to use one ODSI project artifact as jar for other ODSI project?
Hi, I am working on multiple ODSI proejcts in Same Server. My problem is how to call one projects resources in other ODSI project. I need this as Some of Data Services read the data from more then one database. The projects are in seprate Dataspace p
-
Creating a Wireless Access Point
Hey guys, My wireless router just died, my linux server has a wireless card in it and I've read that you can use this as a router - is there any documentation on how to do this? I have no clue where to start..
-
After installing 10.5.6, finder and quicklook server hog cpu for 10 minutes
I installed 10.5.6. Now upon every restart the Finder and Quick Look Server use 60-80% of my cpu for 5-10 minutes. This means that I can't really do anything until these processes are done because they cause constant delays. This did not happen in th
-
J.Nack's blog: Adobe looking vor volunteer testers of CS4 update
Today's blog entry at http://blogs.adobe.com/jnack/: January 19, 2009 Photoshop CS4 update in development In the time since Photoshop CS4 shipped, we've heard from some customers about various things not working as designed. In particular, various Wi
-
I took a second pair of computer speakers I had and hooked them up to line in on the back of my MSI KT3 Ultra2 (6380E). I chged it to 4 channel sound w/o the s-bracket in the Sound Effect Manger control panel program. I tested the speakers in the s