How to upload as one row in xmltype column using sqlloader
I have the file test.xml which has data as shown below
<?xml version="1.0" encoding="ISO-8859-1">-<ops> <op><op_type>A</op_type><ent_type>A</ent_type></op>
<op><op_type>A</op_type><ent_type>A</ent_type></op>
</ops>
I need the entire data to be loaded as one row to a xmltype column.
How can I do this using sqlloader?
I tried the following, but it works only if everything is in one line.
LOAD DATA
INFILE 'test.xml'
INTO TABLE poc
(content char(1000) ENCLOSED BY '<ops>' AND '</ops>')
Is there an EOF option?
XML questions (and answers) are better suited to the XDB forum...
XML DB
But in answer to your question, I don't think sqlloader is the best tool to be using for loading XML data into your database. The XDB forum has loads of examples of how to load XML into database tables.
Similar Messages
-
How to remove only one row from the database using labview6.1
using labview 6.1 I create a table with various rows and columns and store bulk of data's in them.,, what procedure should I follow to remove only one paticular row from the database? Help me out with an example please,,
Thanking you in advance!Hi,
If you have the database toolkit you can delete a row using just a SQL Query to "DB Tools Execute Query.VI"
Example:
DELETE FROM Table name Where SerialNum='Value' And Date='Value' And Time='Value'
See also attached VI
Best Regards
Johan
Attachments:
Delete_a_row_in_a_database_table.vi 48 KB -
How to insert large xml file to XMLType column?
Hi,
I have a table with one column as XMLType(Binary XML storage option and Free Text Indexing). When i try to insert a large XML as long as 8kb, i'm getting an error ORA-01704:string literal too long.
Insert into TEST values(XMLTYPE('xml HERE'));
How to insert large XML values to XMLType column?
Regards,
SprighteeFor a large XML file, you basically have two options - you can load the string directly as an XMLType, or you can load the string as a CLOB and cast it on the database side to an XMLType.
If you decide to load the XML as XmlType client-side, then you may be interested to know that versions of Oracle after 11.2.0.2 support the JDBC 4.0 SQLXML standard. See the JDBC driver release documentation here:
http://docs.oracle.com/cd/E18283_01/java.112/e16548/jdbcvers.htm#BABGHBCC
If you want to load as a CLOB, then you'll need to use PreparedStatement's setClob() method, or allocate an oracle.sql.clob object.
For versions before 11.2.0.2, you can create an XMLType with a constructor that includes an InputStream or byte[] array.
HTH
Edited by: 938186 on Jun 23, 2012 11:43 AM -
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
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. -
How do I deactivate one computer so I can use a third computer?
how do I deactivate one computer so I can use a third computer?
Welcome to Adobe Forum,
http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivat ion-products.html#deactivate-problem
When you install it on the third computer or for the third time & when you to activate it, if it installed & activated already twice, there will be an option of deactivating it from the previous computers, please click on that.
Next it will allow you to activate on your new machine,
Now you can go back to your first computer, log out & log back in of Desktopp CC App, launch any product, if there is any product to buy, in that prompt there will be an option to " license the software", please click on that & sign in.
It will reactivate the CC on the first machine.
You have already deactivated it from one machine, hence you can activate it on third computer.
Regards,
Rajshree -
How to upload a video into Asset Library programmatically using server side code in sharepoint 2013
How to upload a video into Asset Library programmatically using server side code in sharepoint 2013
First you need to configure your asset library with video content type and then you can use SharePoint object model to upload the video files in it...
check this link for setting up Asset library
http://www.c-sharpcorner.com/UploadFile/54db21/asset-library-in-sharepoint-2010/
http://social.technet.microsoft.com/Forums/sharepoint/en-US/1d64a5f7-c7db-4ae0-8b0d-d0722cacf5f2/assets-library-video-files-and-c?forum=sharepointdevelopmentprevious
Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
INSQLSERVER.COM
Mohammad Nizamuddin -
To upload a PDF file in BLOB column using Oracle 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.
Take a look at the following :
Re: Storing a PDF in a BLOB
Re: Retrive Image from DB into Image_item
although the threads above are reffered to images and word doc... the procedure/steps are the same....
Greetings...
Sim -
How can I have one row for each object?
Post Author: farnaz
CA Forum: WebIntelligence Reporting
I have 3 objcts that one of them is ID and second one is internal code and the third one is quantity.There is more than one value for each ID (becouse of internal code).I want to create a report based on ID and quantity (not based on internal code).I make a break on ID but the result shows me more than one row for each ID.so how can i have just one row for each ID?
another question:
how can I post screen shot of the results to my messag in forum?Post Author: jsanzone
CA Forum: WebIntelligence Reporting
farnaz:
Have you tried to omit "internal code" from your grid? In normal circumstances, if you have "ID" and "Quantity" on the grid, then WebI will on its own summarize Quantity based on ID, however, this is provided that Quantity has been set up as a measure (or metric). The quickest way to tell if Quantity is a metric or not is to observe the color of its icon when you look at it in the data panel. If it is a purple (or sometimes appears as pink or fuscia) dot, then it's a measure, but if it is a blue box then it is a dimension. If you need Quantity as a measure then this will have to be modified at the universe (make it look like "sum(Quantity)" in the select phase of the object, and insure the object is defined as a number.... -
hello,
i've got a select query which returns a couple of rows.
now i would like for the query to return only one row (the first match it can find).
how do i do that?
thank you!
my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second row .
84A8E46E8C97 9410 20110812
84A8E46E8C97 9420 20110813
84A8E46E8C6E 9410 20110816
84A8E46E8AFA 9400 20110819876602 wrote:
my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second rowThere is no row order in relational database tables. Same query canreturn rows in different order next time you run it unless you specify ORDER BY. Only ORDER BY guarantees order, so when you say first row/second row you must provide ordering criteria.
SY. -
How I can insert one row on table, with columns settings: readonly = true
I have a problem. (jdeveloper 11.1.1.2.0)
How I can insert row on table (EditingMode= clickToEdit), with columns settings: ReadOnly = true.
When I make click on button create insert, ADF create one row on the table with output text invisible ( ReadOnly = true.)
I make double click, then output text is visible (ReadOnly = false)
I dont want make double click. I want output text is visible (ReadOnly = false), when I make click on button create insert
ThanksHi,
try changing the edit mode of the table when pressing the button and refresh the button. This of course turns the whole table into editable mode, but this is how it needs to work. Alternatively, you create an input form for the user to edit the new record and show the form in a popup or beneath the table. Then when the user submits the created row data, you refresh the table to shwo the new row
Frank -
How to get multiple records in one row and different column
Hi All,
I am using oracle database 11g
and i have a two tables table_1, table_2
table_1 having columns
emp_no
first_name
middle_name
last_name
email
and table_2 having columns
emp_no
phone_type
phone_number
and having entires
emp_no phone_type phone_number
1001 MOB 9451421452
1001 WEMG 235153654
1001 EMG 652341536
1002 MOB 9987526312
1003 WEMG 5332621456
1004 EMG 59612356
Now i want the output of values with phone type as MOB or WEMG in a single row with different columns
emp_no first_name middle_name last_name email mobile officeno
1001 mark null k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312 null
1003 dany null craig [email protected] null 5332621456
1004 donald finn sian [email protected] null null
can i have any inputs to achive this???
Regards
$sidFrank Kulash wrote:
sonething like this:Frank, you missed aggregate function (pivot requires one). However main thing is it will cause ORA-01748:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k'last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
SELECT *
FROM table_1 t1
JOIN table_2 t2 ON t1.emp_no = t2.emp_no
PIVOT ( max(t2.phone_number)
FOR t2.phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
FOR t2.phone_type IN ( 'MOB' AS mob
ERROR at line 19:
ORA-01748: only simple column names allowed hereYou need to:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k' last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
table_3 as (
select t1.emp_no,first_name,middle_name,last_name,email,
phone_type,phone_number
FROM table_1 t1
LEFT JOIN table_2 t2 ON t1.emp_no = t2.emp_no
SELECT *
FROM table_3
PIVOT ( max(phone_number)
FOR phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
EMP_NO FIRST_ MIDD LAST_ EMAIL MOB WEMG
1004 donald finn sian [email protected]
1003 dany craig [email protected] null 5332621456
1001 mark k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312
SQL>SY. -
How to send data one row at a time from xml to flex
I want to setTimerEvent while sending data from xml to flex, one row at a time.
I have attached the xml.
Thanks in advance.Hi Greg,
Thanks for the reply. You must have seen the xml which i have attached.Here is the .mxml code which i have written:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="accountData.send()">
<mx:Script>
<![CDATA[
import mx.controls.*;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
[Bindable]
private var AccountInformation:ArrayCollection;
private function AccountHandler(evt:ResultEvent):void
AccountInformation = evt.result.xml.AccInfo;
private function faultHandler(evt:FaultEvent):void
var faultMessage:String = "Could not connect with XML file";
Alert.show(faultMessage, "Error opening file");
]]>
</mx:Script>
<mx:HTTPService id="accountData" url="pgm1.xml" result="AccountHandler(event)" fault="faultHandler(event)" />
<mx:DataGrid x="20" y="24" width="950" dataProvider="{AccountInformation}" />
</mx:Application>
This reads and displays all the rows. But I want to display single row at a time with sometime time gap between the display of two consecutive rows.I am new to flex and this is my first code, so need your help on this.
I hope i have made myself clear. If there is anything else please let me know.
Looking forward to some solution.
Thanks in advance.
Regards,
praj58 -
How to restrict only one row in Table ??.
Hi all,
i want to restrict no. of rows to one,
that is not more that one row should be there in the table.
Following trigger works well in all conditions
except:
insert into myTab select 'x' from emp;
inserts 14 rows.
Create or replace trigger one_row_myTab
before insert on myTab
for each row
declare
cnt number;
pragma AUTONOMOUS_TRANSACTION;
Begin
select count(*) into cnt from mydual;
if cnt=1 then
raise_application_error(-20001,'MyDual Can have only one Row');
end if;
end;
i think with trigger it w't be possible because,
same transaction triggers c't query the table (Mutating Table),
Autonomus trans ca't identify uncommited changes.
pls add your suggestions.
Thanks for Reading the Post.
Rajashekhar Ganga,
mail : [email protected]nice try Mulder ! it doesn't work everywhere...
SQL> connect scott/tiger@lsc69
Connected to:
Oracle7 Server Release 7.3.4.5.0 - Production
With the distributed and parallel query options
PL/SQL Release 2.3.4.5.0 - Production
SQL> create table d as select * from dual;
Table created.
SQL> create index i on d(1);
create index i on d(1)
ERROR at line 1:
ORA-00904: invalid column name
SQL> connect scott/tiger@lsc65
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
JServer Release 8.1.7.4.0 - 64bit Production
SQL> create table d as select * from dual;
Table created.
SQL> create index i on d(1);
Index created.
SQL> connect scott/tiger@lsc68
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - 64bit Production
With the Partitioning and Data Mining options
SQL> create table d as select * from dual
Table created.
SQL> CREATE UNIQUE INDEX i on d(1);
CREATE UNIQUE INDEX i on d(1)
ERROR at line 1:
ORA-03113: end-of-file on communication channel -
How can I insert one row in ADF Table in JDeveloper 10.1.3
Hi all,
How can I add new row ADF Table in JDeveloper 10.1.3
NOTE : I tried using create button still not working
thanksIf you are using ADF BC - try replacing the binding of the operation from Create to CreateInsert.
See Re: A simple JSF Table CRUD - How To
Maybe you are looking for
-
Remove namespace,xml tag in OSB
OSB In Proxy Service: Once I get response from Business Service 1, I need to send that as request to Business Service 2. Business Service 1 response xml is <Reference>123</Reference> Business Service 2 request xml should be <ReferenceId>123</Referenc
-
How to make Book WSDL available for download?
Hi, I would like to download Book WSDL v2.0. The Web service API document says "To download the Book WSDL, you must be given access to the Book object". However, i did not find any option inside "role management>record types access" to make it availa
-
Advice needed regarding 865PE Neo2 FISR
I intend to order this motherboard either tomorow or Monday morning (depends if I'll find the VGA card I'm looking after). However I heard some disturbing rumors form some friends and so I thought this is the place to ask for advice: 1) which BIOS is
-
Hi, I have a Bdc program, I am sending my code. I just wants material and plant in selectin scree. I donot want create session, call transaction, Nodata Indicator and SMALLLOG. I want to pass processing mode as 'A', Update Mode as 'S' and Nodata Indi
-
EJB 3.x business delegate & service locater
Hi all are business delegate & service locater patterns still relevant when considering EJB 3.x? Why or why not? Does dependency inversion replaces service locater? was there dependency inversion in EJB 2.x?? Thx a lot