How to use SQL*Loader to load XMLType Column with other columns?

Hi,
I am trying to use sqlldr to load an XML file into a table with an XMLType column. I have found plenty of examples where the entire table is an xmltype, but I would like to load many XML objects into a generic table for processing with one XMLType column and many other columns to identify the load. As a simple example, I have one constant column which I want to set during the upload.
The following example does not work :(. No errors either.
create table xml_upload
(upload_type varchar2(10) not null,
xml_data XMLType)
my control file:
LOAD DATA
INFILE * append
INTO TABLE xml_upload
XMLType(xml_data)
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
upload_type constant MARKET,
xml_data
BEGINDATA
<SALE_ORDER>
<CUST_CODE>TIM</CUST_CODE>
<ORDER_NUM>1234></ORDER_NUM>
</SALE_ORDER>
$ sqlldr my.ctl
SQL*Loader: Release 10.2.0.4.0 - Production on Sun Sep 27 22:51:52 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Commit point reached - logical record count 4
SQL> select * from xml_upload;
no rows selected
SQL>
Any ideas on how I can do this? Am I missing something...
I have also been playing with the lobfile clause of sqlldr, also without any success...
Current database version is 10g R2.
Thanks,
Tim.

Hi,
I tried the same example as it is. but, I am getting the following error:
SQL*Loader-350: Syntax error at line 6.
Expecting valid column specification, "," or ")", found "filler".
,file_name  char(100) fillerThe table I created is:
  create table xml_upload
(upload_type varchar2(10) not null,
xml_data XMLType)The control file I used is:
LOAD DATA
INFILE *
INTO TABLE xml_upload TRUNCATE
upload_type constant 'MARKET'
,file_name  char(100) filler
,xml_data LOBFILE (file_name) TERMINATED BY EOF
BEGINDATA
test.xmlThe database I am using is 10gr2

Similar Messages

  • How to use Sql Loader in Unix Environmant

    Hi All,
    Can anyone explain me please how to use sql Loader in unix environment.
    Actually i have one control file i want to run that file in Unix how can i achive please explain me
    Thank's

    Hi Kuljeet,
    Thank you for your replay
    I just put my control file into the Unix Environmant that's fime
    and when i trying to entering the following cmd in Unix environment i am getting this error
    sqlldr username/password@string control='unix_pathname'i am not sure about the path name my question is
    1) Do i need to give the Local file Path Or Unix Path
    This is  the error in Sql Loader:
    SQL*Loader: Release 10.2.0.4.0 - Production on Mon Sep 24 13:14:23 2012
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-500: Unable to open file (/bx167a/riskbatch/rdwdbat/sample_upl.upl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    Could you please correct me
    Thank's

  • How to use TCP Checksum Off-load in my network driver

    I am seeking infomation on how to use TCP Checksum Off-load to tell the Solaris 8 stack not to handle it for both receives and transmits (and let our NIC handle this compute-intensive task instead).
    There is mention that Sun GigabitEthernet Adapter cards, Release 1.1 supports Sol-2.6 use of NIC features: TCP checksum offload & byte swapping
    There are limited bits of info in include files. For example
    sys/strick.h indicates use of:
    inetcksum_t's ick_xmit
    stream.h has:
    struct datab's unsigned u16:16; /* used to store hw-calculated cksum
    #define STRUIO_IP 0x04 /* IP checksum stored in db_struioun */
    #define STRUIO_ZC 0x08 /* mblk eligible for zero-copy */
    strsub.h has:
    struct zero_copy_kstat
    Also /include/inet/tcp.h has tcp_sum for outbound.
    Thank you. -Weimin Tchen

    VenK7337,
    Could you show your python code. so we know what your are "writing" to the ethernet port?
    That way we can see what you are receiving.
    Parsing the incoming data (from the TCP-read) depends heavily on the device that sends it, and can not generically be described. LabVIEW has many byte (and even bit) manipulation functions to convert many different data formats to its own build in formats.
    So after the TCP listener is connected, you are constantly reading from the established connection (until it gets broken of course). More advanced example would be the internet toolkit if oyu have it.
    From the read characters (and I hope you designed a protocol with a clear starting character, ending character and maybe even a build in checksum) you parse the data and perform you action, and of course generate a reply. Again the internet toolkit is a good example. It parsed the input as it comes it, based on the HTTP format. Then generates the reply based on the request received.
    These days I would suggest not to use binairy encoded numerics. Try and use XML formatted data. Yes, it causes a lot of overhead. But typically this is not an issue and makes the code a lot more portable and maintainable. Also makes it easier to interface with other languages/platforms.
    Umless of course you are looking at Khz data rates, then XML is not th preferred choice.
    Hope this helps...

  • How to use Sql data source from Essbase 9.3.1

    Hi All,
    How to use Sql data source from Essbase 9.3.1 for ASO cube.Are there any rules and limitations for that.
    Do we need to create any data source connection for this purpose. If there please let me know the dteps to create that connection.
    Regards

    Yes you need to create one DSN connection and you have to use DSN name and login details at the time of building/loading of the outline.
    Create DSN
    Goto Administrative tools -> DataSources (ODBC) and add the DSN name and specify the Server name of SQL and login details and database.
    goto data prep editor and click on File Menu and Click on Open SQL option Next window opens.
    There you have to enter the details of the DSN connection and SQL query to build/load.
    Thanks,
    Prathap

  • How to use sql query in java ?

    i don't know how to use sql query in java code.
    who can give me some advice?
    thanks

    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • How to use SQL functions in the queries

    hey guys i wanna know how to use SQL functions in the queries is it possible or not .

    Hi,
    Wat exactly that set values are?
    those from sql query?
    How to use count():
    The COUNT() function returns the number of rows that matches a specified criteria.
    SQL COUNT(column_name) Syntax
    The COUNT(column_name) function returns the number of values (NULL values will not be counted) of the specified column:
    SELECT COUNT(column_name) FROM table_name
    SQL COUNT(*) Syntax
    The COUNT(*) function returns the number of records in a table:
    SELECT COUNT(*) FROM table_name
    SQL COUNT(DISTINCT column_name) Syntax
    The COUNT(DISTINCT column_name) function returns the number of distinct values of the specified column:
    SELECT COUNT(DISTINCT column_name) FROM table_name
    The IN function helps reduce the need to use multiple OR conditions.
    The syntax for the IN function is:
    SELECT columns
    FROM tables
    WHERE column1 in (value1, value2, .... value_n);

  • How to Use SQL Query having IN Clause With DB Adapter

    Hi,
    I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
    Thanks

    invoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter

  • How to use SQL() function while writing scripts in BODS 4.0

    How to use SQL() function while writing scripts in BODS 4.0

    Hello,
    I think you want to post your question to the [Data Integration and Data Quality Management|Data Services and Data Quality; forum. This forum is for other BusinessObjects SDK development questions.
    Sincerely,
    Dan Kelleher

  • How to use Sql Tracer

    Hi ,
    How to use SQL Tracer..(ST05).
    Thanks,
    Subbu

    Hi,
    ST05: SQL trace
    1.create a small ABAP/4 program that contains only the select statement. Before proceeding, test it to ensure that it works.
    2.Open that program in the editor so that it is ready and waiting to execute.
    3.Open a new session using the menu path System->Create session.
    4.Run transaction ST05 (enter /nst05-zero-five, not oh-five-in the Command field, or choose the menu path System->Utilities->SQL Trace). The Trace SQL Database Requests screen is displayed.
    5.If the Trace SQL Status Information box reads Trace SQL is switched off, go to step 7.
    6.At this point, the Trace SQL Status Information box contains Trace SQL switched on by, followed by the user id who turned on the trace and the date and time it was started. You must switch it off before you can proceed. If the trace was started within the past hour, it is possible that it is still being used. Contact the indicated user or try again later. If the trace was started hours or days ago, the user probably left it on by mistake and it can be safely turned off. To turn off the trace, press the Trace Off pushbutton. The message in the Trace SQL Status Information box should now read Trace SQL is switched off.
    7.Press the Trace On pushbutton. The Trace SQL Database Requests dialog box is displayed. The DB-Trace for User field should contain your user ID. If your user ID is not in this field, enter it now.
    8.Press the OK button. You are returned to the Trace SQL Database Requests screen and the status information reads Trace SQL switched on by, indicating that you turned on the trace.
    9.Switch back to the window containing your editor session (the one with your program waiting to execute).
    10.Press F8 to run your program. (Only press F8, do not do anything else, do not even press the Back button.)
    11.When your program has run and the hourglass is no longer displayed, switch back to the trace window.
    12.Press the Trace Off pushbutton. The status information reads Trace SQL is switched off.
    13.Press the List Trace pushbutton. The Trace SQL Database Requests dialog box is displayed. The fields on this screen will already contain values.
    14.Press the OK button. You might need to wait a little while, at most a couple of minutes. The Trace SQL: List Database Requests screen is displayed.
    15.Type %sc in the Command field and press the Enter key. The Find dialog box is displayed.
    16.Type the name of the table you are tracing in the Search For field. (This is the table named in the select statement in your ABAP/4 program.)
    17.Press the Find button. A search results list should be displayed with your table name highlighted.
    18.Click on the first highlighted table name. You are returned to the Trace SQL: List Database Requests screen. Your cursor is positioned on the first line containing your table name. To the right of it, in the Operation column, should be the word PREPARE, OPEN, or REOPEN.
    19.Press the Explain SQL button on the Application toolbar. The Show Execution Plan for SQL Statement screen is displayed.
    20.Scroll down to the execution plan. The index used will be displayed in blue.
    Jogdand M B

  • How to use SQL Developer Debugger

    I'm using SQL Developer Version 3.2.20.09 and want to use its debugger option. I tried to get "how to use SQL Developer Debugger" by using google.ca but didn't get any tutorial. I really appreciate if someone suggest me any good and simple tutorial regarding SQL Developer Debugger, Thanks in advance.

    Hello,
    you can find a tutorial here:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/devdays2012/mod2_sqldev/mod2_sqldev.html
    Joop

  • How can use my Wireless Location Appliance to work with RF ID's?

    How can use my Wireless Location Appliance to work with RF ID's for Asset Tagging.
    It seems Smartcard used for ID cards have a small RF ID, can I use this for Asset Tagging?
    Thanks in Advance

    There are two kinds of RFID tags: Active tags, which have a battery or other internal power source, and passive tags, which have no power source and work by reflecting the energy from an RFID scanner (basically). At the energy levels and distances used for WiFi location detection, passive tags will not return a detectable signal.
    Take a look at http://www.aeroscout.com/ for more info on WiFi RFID tagging.

  • How to use Crystal Reports XI release 2 Preview with Lotus Notes  Scripts ?

    <br />Hi all,<br /><br /> How to use Crystal Reports XI release 2 Preview with Lotus Notes 7 Scripts ?<br /><br /> <br /><br />Thank&#39;s  <br />

    Hi,
    we are using Lotus Notes and Crystal Reports for preview and printing reports from our Lotus Notes Applications. We use the RDC object model. For previewing the reports we export them in an pdf-file and then start the PDF Reader to show the Preview. This works fine.
    But with Crystal Reports > 11 the RDC Object Model is no longer supportet, so we look for another way to preview and print our reports.
    I try to preview a report build with crystal report XI release 2 in my thick client (Lotus Notes) using java reporting component JRC, this report uses an native xml file as datasource. If the datasource is saved with the report everything works fine, but otherwise I have the following error:
    JRCAgent1 detected an exception: javax.xml.namespace.QName: method getPrefix()Ljava/lang/String; not found
    I also tried the .jars from Crystal4Eclipse. Doesn't work. When I use Eclipse to view the report everything works fine. The class QName exitsts in the jaxrpc.jar and in the xbean.jar, but only in the xbean.jar a Methode getPrefix exists.
    This is what we tried:
    Works fine with RDC. Doesn't work with JRC until now.
    Did this help you ?
    Perhaps you con help me with the JRC, because I'm a java newbee so any ideas could be helpful.
    Oliver
    <p><a href="http://www.cominform.de">www.cominform.de</a></p>

  • How to use the special character pallet in Maverics with Illustrator

    How to use the special character pallet in Mavericks with Illustrator - I follow the help instructions, but the pasted in object looks like a rectangle with an X, I have done this before, in earlier versions of AI, but cannot make it work in CS6.
    In fact, I can open an old AI file (CS4), copy the character (a graphic symbol, also taken from the special character set), paste it in, and it works, but can't do this with a new one, from the drop down, Show Character Viewer, in the Mavericks menu bar.

    The box with an X indicates the font you are using does not have the glyph you are trying to paste. Try a different font.

  • How to use LABVIEW to collect wireless network camera (with video server) video.

    How to use LABVIEW to collect wireless network camera (with video server) video.I would like to use LABVIEW for a wireless network camera (IP Camera comes with the video server module)the client program.Will the ability to achieve?If feasible, how to do, there are examples, thank you.

    I believe NI Vision is what you are looking for. 

  • How to copy data from one column to other column

    hi,
    can any one tell me how to copy data of  one column to other column for some specific data
    example
    productno  ocalyear        actualsales  prevplansales   currentplansales
    p001       2007                  100              120                   
    p002       2007                   90               100
    p003       2007                  120              130
    p004       2007                  140              120
    p005       2007                  150              150
    i want to copy data of p001 and p002 from prevplansales to current plansales
    productno  ocalyear        actualsales  prevplansales   currentplansales
    p001       2007                  100              120              120     
    p002       2007                   90               100              100
    p003       2007                  120              130
    p004       2007                  140              120
    p005       2007                  150              150
    is it possible to do?
    please suggest me.
    i will assign points

    Hi,
    I think the needed techniques are already described in the documentation, e.g. in
    http://help.sap.com/saphelp_nw70/helpdata/en/45/e641e4c61256dee10000000a114a6b/frameset.htm
    or
    http://help.sap.com/saphelp_nw70/helpdata/en/45/e641e4c61256dee10000000a114a6b/frameset.htm
    The main techiques used in the above example to bind the filter of the planning function to selected (marked) objects in the analysis item or to drop down boxes (or both). These techniques are used in the above examples.
    Regards,
    Gregor

Maybe you are looking for

  • Phone stuck on connect to itunes screen after update attempt

    Hi, hope someone can help me. I connected my iPhone to my computer to transfer my photos from the phone to the PC. I have automatic syncing turned off. When I connected, I was prompted to update the iTunes version, which I did. It's now version 9. Th

  • 2 hard drives - Windows on one and OSX on the other

    I currently have one 750gb spinning HDD with Windows on a Boot Camp partition in my MacBook. I am thinking of getting a new 256gb SSD and making it a OSX only drive. Once I get that setup, I would like to get rid of the SuperDrive and install my old

  • Movie download restart

    IT7 I am using a esata drive connected to my expresscard slot. I was downloading a movie and had about 800meg downloaded. The card got unplugged which dis-connected the drive. when I went back in to restart download it started from the very beginning

  • Source Attachment Settings in Flash Builder

    Hello everyone, I am facing an issue with debugging. I don't want to step through the framework code in the debug mode. To avoid that, I removed the Source attachments, by selecting that node in the tree and clicking on remove. But it doesn't save th

  • Partitioning - actual value combinations

    Hi, Can we 'actual value combinations' by doing Partioning?? how? like i have records Both fields have lookup values Field 1 - have values 1, 2, 3, 4 Field 2 - A, B, C After Partioning All possible combinations will be 1A, 1B, 1C, 2A, 2B, 3C, so on (