How to upload an rtf file into a table? (without using UNIX box)
Hi All,
Our requirement is to upload a rtf file into table in database.
Later that rtf is used to generate a report.
Is it possible to upload the file directly into a table by using SQL developer?
our requirement is to upload the files without placing them in a particular path in unix box.
Thanks in advance
Regards
Sudeep
If you are in EBS
When you upload Template in Application
I guess It'll get stored in apps.XDO_LOBS table, in FILE_DATA Column
select * from apps.XDO_LOBS
where lob_code=<'con. program short name'>
and file_name= <'your.rtf'>
Thanx
Rahul
Similar Messages
-
How to upload a Flat file into sap database if the file is in Appl'n Server
Hello Sap Experts , Can you tel me
" How to upload a Flat file into sap database if the file is in Application Server.
what is Path for that ?
Plz Tel Me its Urgent
Thanks for allHi,
ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
*& Report ZUPLOADTAB *
*& Example of Uploading tab delimited file *
REPORT zuploadtab .
PARAMETERS: p_infile LIKE rlgrap-filename
OBLIGATORY DEFAULT '/usr/sap/'..
DATA: ld_file LIKE rlgrap-filename.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
name1 like pa0002-VORNA,
name2 like pa0002-name2,
age type i,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
wa_record TYPE t_record.
*Text version of data table
TYPES: begin of t_uploadtxt,
name1(10) type c,
name2(15) type c,
age(5) type c,
end of t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.
*String value to data in initially.
DATA: wa_string(255) type c.
constants: con_tab TYPE x VALUE '09'.
*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:
*class cl_abap_char_utilities definition load.
*constants:
* con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
*START-OF-SELECTION
START-OF-SELECTION.
ld_file = p_infile.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
ELSE.
DO.
CLEAR: wa_string, wa_uploadtxt.
READ DATASET ld_file INTO wa_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
APPEND wa_upload TO it_record.
ENDIF.
ENDDO.
CLOSE DATASET ld_file.
ENDIF.
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD
* Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop. -
How to upload 20MB of file into MySQL through Java
Hi Friends
Anyone let me know how to upload 20MB of file into MySQL through Java programming, is there is any feature available, or any changes to be made in MySQL
Thanks
SellaDon't know. Ask the MySQL folks. This is not a Java issue.
-
How to insert a gif file into a table?
Hi,
I need to insert a gif file into a table. Can anyone tell me where I can find the information on how to create this kind of table, how to insert a gif file into a table and how to select?
Thanks,
HelenHi Helen,
You could read about that in the documentation which is available online.
For a starter: BLOB. And I bet there are many examples to be found on the web.
Good luck. :)
Regards,
Guido -
How to load Matrix report data into basic table data using ODI
Hi,
How to load Matrix report data into basic table data using oracle Data Integrator ?
Requirement Description:
Following is the matrix report data:
JOB DEPT10 DEPT20
ANALYST 6000
CLERK 1300 1900 Need to convert it into below format:
JOB Dept Salary
ANALYST DEPT10
ANALYST DEPT20 6000
CLERK DEPT10 1300
CLERK DEPT20 1900
Thanks for your help in advance. Let me know if any further explanation is required.Your list seems to be a little restrictive, you can do a lot more with ODI procedures.
If you create new procedure, and add a step. In the 'command on source' tab set you technology and schema as per your source database. Use the unpivot functionality as described in the link, please, rather than using 'SELECT *' use the appropriate column names and alias them for eg:
SELECT job as job,
deptsal as deptsal,
saldesc as saledesc
FROM pivoted_data
UNPIVOT (
deptsal --<-- unpivot_clause
FOR saldesc --<-- unpivot_for_clause
IN (d10_sal, d20_sal, d30_sal, d40_sal) --<-- unpivot_in_clause
Then in your 'command on target' tab set the technology and schema to your target db, then put your INSERT statement for eg:
INSERT INTO job_sales
(job,
deptsal,
saledesc
VALUES
:job,
:deptsal,
:saledesc
Therefore you are using bind variables from source to load data into target.
Obviously if the source and target table are in the same database, then you can have it all in one statement in the 'command on target' as
INSERT INTO job_sales
(job,
deptsal,
saledesc
SELECT job as job,
deptsal as deptsal,
saldesc as saledesc
FROM pivoted_data
UNPIVOT (
deptsal --<-- unpivot_clause
FOR saldesc --<-- unpivot_for_clause
IN (d10_sal, d20_sal, d30_sal, d40_sal) --<-- unpivot_in_clause
also set the log counter as 'Insert' on the tab where your INSERT statement is, so you know how many rows you insert into the table.
Hope this helps.
BUT remember that this feature only came out in Oracle 11g. -
How to Upload a PDF file into BLOB column in a table using Forms 9i
Can anyone tell me how to upload a PDF file from client system using File dialog window and store its content in BLOB column in a table. The file to be uploaded will be in client side.
Hi,
please, search a bit on the forum before do a question:
Just searching by "upload blob pdf" ...
How to batch upload PDF files into database BLOB
Regards,
Jose. -
CRM ABAP How to upload an Excel file into an internal table?
How to upload an Excel file using GUI_UPLOAD?? what should be the values of the parameters? The function modules ALSM_EXCEL_TO_INTERNAL_TABLE and KCD_EXCEL_OLE_TO_INT are not present in CRM. Please suggest me a way out!
Hi saurabh,
you can try the folowing sample..
and make modifications according to your requirement..
TYPE-POOLS: truxs.
DATA: i_text_data TYPE truxs_t_text_data,
v_filename_string TYPE string.
DATA: BEGIN OF itab OCCURS 0,
Name(30),
Phone(15),
Fax(500).
DATA: END OF itab.
PARAMETERS: p_file LIKE rlgrap-filename.
START-OF-SELECTION.
v_filename_string = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_filename_string
filetype = 'ASC'
has_field_separator = 'X'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
dat_mode = ''
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = i_text_data
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.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
* I_LINE_HEADER =
i_tab_raw_data = i_text_data
i_filename = p_file
TABLES
i_tab_converted_data = itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
this is a sample code that uploads a excel file using GUI_UPLOAD, but uses another function module to convert that uploaded data into an internal table..
regards
satesh -
How to upload an XML file into another system
Hi friends,
I have a requirement where I need to upload an XML file into one system
which has been downloaded using another system.
I have tried using the method ' cl_gui_frontend_services=>gui_upload'
to upload the file but it is going for dump.
I have used the method ' w_xml->import_from_file' also,
but it is also going for dump ,because both methods are using the same FM
' GUI_UPLOAD'.
Can any one suggest on this.
Regards,
Bhargavi.D"Here is the Explaination for uploading the XML Format file to sap " through ABAP Program ....
1. Basically you simply have to convert the XML file into the proper IDoc format. There are many ways to achieve this. One solution would be to convert it externally to SAP, e.g. via VB Script or with an XSLT transformation. Or you use the built in SAP functions for importing an IDoc from an XML stream.
2. Uploading a file is either done via GUI_UPLOAD or via the usual way of reading a file from the application server (Open dataset. Read dataset) But what do you mean by "send to external system"? Do you want to convert an IDoc into XML? Then you simply define an XML port with WE21 to send the IDoc out.
Here is an example of code that loads an XML from file and posts it as an IDoc. Please keep in mind that the XML has to be in its canonical format as described in the interface repository: ifr.sap.com (choose the template of the desired IDoc from there as an example).
data: data_tab type table of char1024.
data: XML_STREAM type string.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'D:test.xml'
* FILETYPE = 'ASC'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = DATA_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.
CALL FUNCTION 'CONVERT_TABLE_TO_STRING'
EXPORTING
I_TABLINE_LENGTH = '1024'
IMPORTING
E_STRING = XML_STREAM
TABLES
IT_TABLE = DATA_TAB[].
write: / xml_stream color col_total.
data: CONTENT_LENGTH type string.
data: CONTENT_TYPE type string.
data: REMOTE_ADDR type string.
CALL FUNCTION 'IDOC_INBOUND_XML_VIA_HTTP'
EXPORTING
XML_STREAM = XML_STREAM
CONTENT_LENGTH = content_type
CONTENT_TYPE = content_type
REMOTE_ADDR = remote_addr
EXCEPTIONS
NO_IDOCS_SAVED = 1
TAG_ERROR = 2
NO_DATA_RECEIVED = 3
NO_IDOCS_RECEIVED = 4
SEGMENT_ERROR = 5
IDOC_WAS_SEND_SECOND_TIME = 6
OTHERS = 7
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
write: / sy-subrc color COL_NEGATIVE.
ENDIF.
reward points if it is usefull.......
Girish -
How to Upload a PDF file into BLOB column in a table using Forms 6i
Can anyone tell me how to upload a PDF file from client and store its content in BLOB column in a table. The file will be genered using reports and win be stored in db.The file to be uploaded will be in client side.
Thank´s.If you are using version 9 or 10 use webutil.... Look in webutil.pll.
Use either one these two fuctions...
FUNCTION Client_To_DB( clientFile in VARCHAR2,
tableName in VARCHAR2,
columnName in VARCHAR2,
whereClause in VARCHAR2,
asynchronous in BOOLEAN default FALSE,
callbackTrigger in VARCHAR2 default NULL) return BOOLEAN;
FUNCTION Client_To_DB_With_Progress
( clientFile in VARCHAR2,
tableName in VARCHAR2,
columnName in VARCHAR2,
whereClause in VARCHAR2,
progressTitle in VARCHAR2,
progressSubTitle in VARCHAR2,
asynchronous in BOOLEAN default FALSE,
callbackTrigger in VARCHAR2 default NULL) return BOOLEAN; -
How to upload the text file into smart forms
Hi Experts,
can any one tell me that how to upload the text file or html file to SAP Script form or smart forms
i have download the form info from SAPscript form.to text file.
now i want to upload the text file to smartforms.
is it possible ? if it is possible, then how can i do that ?
Thanks in Advance.
Regards,
Mani<b>For Scripts</b>
Go to SE38. Put in the program name RSTXSCRP. Execute it.
Mode(Export/Import) : Import.
Give the file name from which you want to upload and execute it.
<b>For Smartforms</b>
TCode : smartforms.
Give the form name.
Utilities-->Upload form.
Reward points if helpful.
Thanks
Aneesh. -
Upload an excel file into a table
Good Morning:
I have to upload the contents of an excel file into a table. Someone knows how to do it?
Thanks a lot.Hi,
See this sample code.
At selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
field_name = 'p_file'
importing
file_name = p_file.
clear itab.
call function 'WS_UPLOAD'
exporting
codepage = ' '
filename = p_file
filetype = 'DAT'
tables
data_tab = itab
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10.
Here you need to save your Excel file as a 'DAT' file.
I hope this will help you.
CHEERS
Message was edited by: Deepak333 k -
How to load a XML file into a table using PL/SQL
Hi Guru,
I have a requirement, that i have to create a procedure or a package in PL/SQL to load XML file into a table.
How we can achive this.ODI_NewUser wrote:
Hi Guru,
I have a requirement, that i have to create a procedure or a package in PL/SQL to load XML file into a table.
How we can achive this.
Not a perfectly framed question. How do you want to load the XML file? Hoping you want to parse the xml file and load it into a table you can do this.
This is the xml file
karthick% cat emp_details.xml
<?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>09-JUN-1981</HIREDATE>
<SAL>2450</SAL>
<COM>0</COM>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<HIREDATE>17-NOV-1981</HIREDATE>
<SAL>5000</SAL>
<COM>0</COM>
<DEPTNO>10</DEPTNO>
</ROW>
</ROWSET>
You can write a query like this.
SQL> select *
2 from xmltable
3 (
4 '/ROWSET/ROW' passing xmltype
5 (
6 bfilename('SDAARBORDIRLOG', 'emp_details.xml')
7 , nls_charset_id('AL32UTF8')
8 )
9 columns empno number path 'EMPNO'
10 , ename varchar2(6) path 'ENAME'
11 , job varchar2(9) path 'JOB'
12 , mgr number path 'MGR'
13 , hiredate varchar2(20)path 'HIREDATE'
14 , sal number path 'SAL'
15 , com number path 'COM'
16 , deptno number path 'DEPTNO'
17 );
EMPNO ENAME JOB MGR HIREDATE SAL COM DEPTNO
7782 CLARK MANAGER 7839 09-JUN-1981 2450 0 10
7839 KING PRESIDENT 17-NOV-1981 5000 0 10
SQL> -
How to load a XML file into a table
Hi,
I've been working on Oracle for many years but for the first time I was asked to load a XML file into a table.
As an example, I've found this on the web, but it doesn't work
Can someone tell me why? I hoped this example could help me.
the file acct.xml is this:
<?xml version="1.0"?>
<ACCOUNT_HEADER_ACK>
<HEADER>
<STATUS_CODE>100</STATUS_CODE>
<STATUS_REMARKS>check</STATUS_REMARKS>
</HEADER>
<DETAILS>
<DETAIL>
<SEGMENT_NUMBER>2</SEGMENT_NUMBER>
<REMARKS>rp polytechnic</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>3</SEGMENT_NUMBER>
<REMARKS>rp polytechnic administration</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>4</SEGMENT_NUMBER>
<REMARKS>rp polytechnic finance</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>5</SEGMENT_NUMBER>
<REMARKS>rp polytechnic logistics</REMARKS>
</DETAIL>
</DETAILS>
<HEADER>
<STATUS_CODE>500</STATUS_CODE>
<STATUS_REMARKS>process exception</STATUS_REMARKS>
</HEADER>
<DETAILS>
<DETAIL>
<SEGMENT_NUMBER>20</SEGMENT_NUMBER>
<REMARKS> base polytechnic</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>30</SEGMENT_NUMBER>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>40</SEGMENT_NUMBER>
<REMARKS> base polytechnic finance</REMARKS>
</DETAIL>
<DETAIL>
<SEGMENT_NUMBER>50</SEGMENT_NUMBER>
<REMARKS> base polytechnic logistics</REMARKS>
</DETAIL>
</DETAILS>
</ACCOUNT_HEADER_ACK>
For the two tags HEADER and DETAILS I have the table:
create table xxrp_acct_details(
status_code number,
status_remarks varchar2(100),
segment_number number,
remarks varchar2(100)
before I've created a
create directory test_dir as 'c:\esterno'; -- where I have my acct.xml
and after, can you give me a script for loading data by using XMLTABLE?
I've tried this but it doesn't work:
DECLARE
acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
BEGIN
insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
select x1.status_code,
x1.status_remarks,
x2.segment_number,
x2.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns header_no for ordinality,
status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'$d/ACCOUNT_HEADER_ACK/DETAILS[$hn]/DETAIL'
passing acct_doc as "d",
x1.header_no as "hn"
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS'
) x2
END;
This should allow me to get something like this:
select * from xxrp_acct_details;
Statuscode status remarks segement remarks
100 check 2 rp polytechnic
100 check 3 rp polytechnic administration
100 check 4 rp polytechnic finance
100 check 5 rp polytechnic logistics
500 process exception 20 base polytechnic
500 process exception 30
500 process exception 40 base polytechnic finance
500 process exception 50 base polytechnic logistics
but I get:
Error report:
ORA-06550: line 19, column 11:
PL/SQL: ORA-00932: inconsistent datatypes: expected - got NUMBER
ORA-06550: line 4, column 2:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
and if I try to change the script without using the column HEADER_NO to keep track of the header rank inside the document:
DECLARE
acct_doc xmltype := xmltype( bfilename('TEST_DIR','acct.xml'), nls_charset_id('AL32UTF8') );
BEGIN
insert into xxrp_acct_details (status_code, status_remarks, segment_number, remarks)
select x1.status_code,
x1.status_remarks,
x2.segment_number,
x2.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'/ACCOUNT_HEADER_ACK/DETAILS'
passing acct_doc
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS'
) x2
END;
I get this message:
Error report:
ORA-19114: error during parsing the XQuery expression:
ORA-06550: line 1, column 13:
PLS-00201: identifier 'SYS.DBMS_XQUERYINT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
ORA-06512: at line 4
19114. 00000 - "error during parsing the XQuery expression: %s"
*Cause: An error occurred during the parsing of the XQuery expression.
*Action: Check the detailed error message for the possible causes.
My oracle version is 10gR2 Express Edition
I do need a script for loading xml files into a table as soon as possible, Give me please a simple example for understanding and that works on 10gR2 Express Edition
Thanks in advance!The reason your first SQL statement
select x1.status_code,
x1.status_remarks,
x2.segment_number,
x2.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns header_no for ordinality,
status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'$d/ACCOUNT_HEADER_ACK/DETAILS[$hn]/DETAIL'
passing acct_doc as "d",
x1.header_no as "hn"
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS'
) x2
returns the error you noticed
PL/SQL: ORA-00932: inconsistent datatypes: expected - got NUMBER
is because Oracle is expecting XML to be passed in. At the moment I forget if it requires a certain format or not, but it is simply expecting the value to be wrapped in simple XML.
Your query actually runs as is on 11.1 as Oracle changed how that functionality worked when 11.1 was released. Your query runs slowly, but it does run.
As you are dealing with groups, is there any way the input XML can be modified to be like
<ACCOUNT_HEADER_ACK>
<ACCOUNT_GROUP>
<HEADER>....</HEADER>
<DETAILS>....</DETAILS>
</ACCOUNT_GROUP>
<ACCOUNT_GROUP>
<HEADER>....</HEADER>
<DETAILS>....</DETAILS>
</ACCOUNT_GROUP>
</ACCOUNT_HEADER_ACK>
so that it is easier to associate a HEADER/DETAILS combination? If so, it would make parsing the XML much easier.
Assuming the answer is no, here is one hack to accomplish your goal
select x1.status_code,
x1.status_remarks,
x3.segment_number,
x3.remarks
from xmltable(
'/ACCOUNT_HEADER_ACK/HEADER'
passing acct_doc
columns header_no for ordinality,
status_code number path 'STATUS_CODE',
status_remarks varchar2(100) path 'STATUS_REMARKS'
) x1,
xmltable(
'$d/ACCOUNT_HEADER_ACK/DETAILS'
passing acct_doc as "d",
columns detail_no for ordinality,
detail_xml xmltype path 'DETAIL'
) x2,
xmltable(
'DETAIL'
passing x2.detail_xml
columns segment_number number path 'SEGMENT_NUMBER',
remarks varchar2(100) path 'REMARKS') x3
WHERE x1.header_no = x2.detail_no;
This follows the approach you started with. Table x1 creates a row for each HEADER node and table x2 creates a row for each DETAILS node. It assumes there is always a one and only one association between the two. I use table x3, which is joined to x2, to parse the many DETAIL nodes. The WHERE clause then joins each header row to the corresponding details row and produces the eight rows you are seeking.
There is another approach that I know of, and that would be using XQuery within the XMLTable. It should require using only one XMLTable but I would have to spend some time coming up with that solution and I can't recall whether restrictions exist in 10gR2 Express Edition compared to what can run in 10.2 Enterprise Edition for XQuery. -
Loading an XML file into the table without creating a directory .
Hi,
I wanted to load an XML file into a table column . But I should not create a directory in the server and placing the XML file there and giving the path in the insert query. Can anybody help me here?
Thanks in advance.You could write a java stored procedure that retrieves the file into a clob. Wrap that in a function call and use it in your insert statement.
This solution require read privileges granted by sys and is therefore only feasible if the top-level directory/directories are known or you get read-access to everything. -
How to upload a flat file into a Z DB table
Hi All,
For a planning application I would like to permit our users to upload a flat file to a internal table to be persisted on to any given database Z Table. From here we would use it in a planning application.
Please kindly share the code and approach to implement this in BSP.
Thanks
KarenHi Karen,
Check the links mentioned below.
[Excel to internal table|Excel to Internal table in BSP;
[upload excel into BSP|upload excel sheet into BSP application;
The two links show how to convert an excel file data to internal table in BSP application.Similarly you can convert the flat file data to internal table and then modify the Z DB table to store the data from internal table.
Regards,
Anubhav
Maybe you are looking for
-
The loops arent accessible. Ive tried getting software updates but nothing seems to make them work.
-
Seeing that this has become quite a problem, I need to tell you all about this crap. I have been forced to buy a new PC, due to the old one breaking down. (Finally, had it for 8 years...) Now, while I have taken a backup of the iTunes Library, includ
-
How do i change the redeem gift card from one apple id to another?
i want to move the redeem gift card from one apple id to another one is that possible?
-
MacBook pro still won't back up, not even with a cable.
I backed up my G4 tower wirelessly. I backed up my G4 Powerbook using an ethernet cable to the Timecapsule LAN port. (Of course now that I've upgraded to 10.5.2 neither of their airport cards works anymore. No fix for that so far.) But the MacBook Pr
-
Reverting to G4 whilst imac in for repair - and questions
My intel Imac is having to go in for diagnostic work. So, I'm having to use the trusty old G4 in the meantime. My question is this: I have a cloned system of the intel mac on an external HD, but that is a cloned system of Leopard. So I won't be able