Using sqlldr to load XML files and the file name ?  or access the file name

I can use sqlldr to load the XML files when I declare the target table of XMLTYPE, but I need to load the filename and a sequence also with the XML in a table so we can mark wether the file passed validation or not.
something like ....
Create table test1
lobfn varchar(200),
load_number number,
XML_COL XMLTYPE
--------------- here is my sqlldr command
sqlldr xml_user/xml_user load_test1.ctl
LOAD DATA
INFILE *
INTO TABLE test1
append
xmltype(XML_COL)
lobfn FILLER char TERMINATED by ',',
XML_COL LOBFILE(lobfn) TERMINATED BY EOF
BEGINDATA
filename1.xml
filename2.xml
filename64.xml
sqlldr comes back and says "commit point reached - logical record count 64
but when I select count(*) from test1; it returns 0 rows.
and when I
SELECT X.* FROM tst1 P2,
XMLTable ( '//XMLRoot//APPLICATION'
PASSING P2.XML_COL
COLUMNS
"LASTNAME" CHAR(31) PATH 'LASTNAME',
"FIRSTNAME" CHAR(31) PATH 'FIRSTNAME'
) AS X;
It tells me invalid identifier ,
Do I need to use a function to get the XML_COL as a object_value ???
But when I create the table like
create table test1 of XMLTYPE;
and use sqlldr it works, but I dont have the file name, or dont know how to access it ??
and I can use
SELECT X.* FROM tst1 P2,
XMLTable ( '//XMLRoot//APPLICATION'
PASSING P2.object_value
COLUMNS
"LASTNAME" CHAR(31) PATH 'LASTNAME',
"FIRSTNAME" CHAR(31) PATH 'FIRSTNAME'
) AS X;

BTW
Here's a trivial example of what you appear to be trying to do..
C:\xdb\otn\sqlLoader>sqlplus scott/tiger @createTable
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 2 22:08:10 2006
Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> DROP TABLE TEST_TABLE
  2  /
Table dropped.
SQL> CREATE TABLE TEST_TABLE
  2  (
  3    filename    VARCHAR2(32),
  4    file_content xmltype
  5  )
  6  /
Table created.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
C:\xdb\otn\sqlLoader>type sqlldr.ctl
LOAD DATA
INFILE 'filelist.txt'
   INTO TABLE TEST_TABLE
   FIELDS TERMINATED BY ','
    FILENAME       CHAR(32),
    FILE_CONTENT   LOBFILE(FILENAME) TERMINATED BY EOF
C:\xdb\otn\sqlLoader>type filelist.txt
testcase1.xml
testcase2.xml
C:\xdb\otn\sqlLoader>type testcase1.xml
<foo/>
C:\xdb\otn\sqlLoader>type testcase1.xml
<foo/>
C:\xdb\otn\sqlLoader>sqlldr userid=SCOTT/TIGER control=sqlldr.ctl log=sqlldr.log -direct
SQL*Loader: Release 10.2.0.2.0 - Production on Wed Aug 2 22:08:11 2006
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Load completed - logical record count 2.
C:\xdb\otn\sqlLoader>sqlplus scott/tiger
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 2 22:08:18 2006
Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from TEST_TABLE
  2  /
FILENAME
FILE_CONTENT
testcase1.xml
<foo/>
testcase2.xml
<baa/>
SQL>
If you are interested in the 11g beta program please contact me directory at
markDOTdrakeAToracleDOTcom

Similar Messages

  • One of the folders on my external hard drive has transformed into a unix executable file and I can no longer access my files. Is there any way to save the data?

    One of the folders on my external hard drive has transformed into a unix executable file and I can no longer access my files. Is there any way to save the data?

    Wow, have seen Files do that, but a whole Folder as I recall!
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • Using SQLLDR to load files

    I guess this is kind of a newbie question, so sorry in advance, but I can't figure this out from the documentation.
    I would like to use SQLLDR to load a series of files (a.txt, b.txt, c.txt, for example) to a CLOB. I want one file per row as each one is a separate document. I want everything in the file loaded up until EOF, then I want to move on to the next file.
    It sounds fairly simple, but so far I haven't been very successful. Could anyone post an example control file.
    Thanks.

    Use DBMS_LOB.LoadFromFile to do this (files must be accesible from the Oracle server to do this).
    Message was edited by:
    Kamal Kishore

  • Could not save Preferences because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the 'Get Info' command in the Finder to ensure the file is unlocked and you have permission to access the file.

    I have this massage every time close ps cc
    Could not save Preferences because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the ‘Get Info’ command in the Finder to ensure the file is unlocked and you have permission to access the file. If the problem persists, save the document to a different file or duplicate it in the Finder.

    You may get better help in Photoshop General Discussion
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll
    If FINDER means Mac, read below (and try to give more information when asking a question)
    Mac 10.9.3 workaround https://forums.adobe.com/thread/1489922
    Enable Mac Root User https://forums.adobe.com/thread/1156604
    -more Root User http://forums.adobe.com/thread/879931
    -and more root user http://forums.adobe.com/thread/940869?tstart=0

  • I use a desktop version of Lightroom and am wanting to move to the Cloud version.  What happens to my files, etc., on my desktop when I download the cloud version?  I don't want to lose my metadata, etc.  If anyone out there knows, please let me know.

    I use a desktop version of Lightroom and am wanting to move to the Cloud version.  What happens to my files, etc., on my desktop when I download the cloud version?  I don't want to lose my metadata, etc.  If anyone out there knows, please let me know.

    I just installed LR CC and am having trouble opening catalogs where I followed the instructions to upgrade.  Just posted a question about it.
    Discovered a problem when I went looking for some images that were not included in the most recent catalog.  After opening up a couple of older ones and upgrading, I went back to the most recent and couldn't opening.  Message says it is not writable.  And also says it may be due to incorrect permissions.  If you have any suggestions for this, I would love to hear them.

  • When I open iPhoto 9.2.1 it says that my library needs to be upgraded but when I upgrade the library I am trying to open (33 GB worth of pictures from 2006) the new application says it cannot read the files and how to find them on the system to reimport?!

    When I open iPhoto 9.2.1 it says that my library needs to be upgraded but when I upgrade the library I am trying to open (33 GB worth of pictures from 2006) the new application says it cannot read the files and how to find them on the system to reimport?! and then I'd like to erase the original files since the space requirement is huge!!!! Why is upgrading software iPhoto such a pain. I've gotta get a presentation done and all I get for my money is roadblock!!!

    hello, it sounds like the library is damaged.
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 

  • I have been using itunes for 6 years now, and was listening to my music the other day and noticed that some of my songs were stopping short of finishing.

    I have been using itunes for 6 years now, and was listening to my music the other day and noticed that some of my albums songs were stopping short of finishing. They just stop and go to the next song. Any solutions? 

    I have experienced the same problem on my my iPad1, my former iPhone 4 my laptop and even my new iPhone5  though I had really hoped that the new phone and IOS would solve the problem.  About 5% of the songs are affected and the stoppage can range from seconds short to a minute and a half.  The file shows more of the music left, but it stops playing and goes to the next song.  Very aggravating.  Appears to happen on purchased and uploaded music.
    Any help Apple?

  • How can FMS create a text file and write data into it in the Server application folders?

    Recently, I writed a programe about creating a text file and writing data into it in the server application folder. My code is as following:
               var fileObj = new File("/MyApp/test.txt");
               if( fileObj !=  null)
                      if(fileObj.open( "text", "append"))
                            fileObj.write( "                                                      ———— Chat Info Backup ————\r\n" );
                            fileObj.close( );
                            trace("Chat info backup document :" +  fileObj.name + " has been created successfully!");    
    But when I run it, FMS throw the error as following: File operation open failed  ;  TypeError: fileObj has no properties.
    Can you help me ? Thanks in advance.
    Supplement: The text file named test.txt doesn't exist before create the fileObj, an instance of File Class.

    Is MyApp the name of the application directory, or is it a child of the application directory? If myApp is the app name, just use test.txt as the path flag in the file constructor.

  • The green forward and back arrows under File and Edit disappeared after I downloaded the new Firefox Toolbar. How do get them back?

    The green arrows for page forward or back at the top left under File and Edit disappeared after I downloaded the new Firefox toolbar (for 3.6) and were replaced by Most Visited, Getting Started and Latest headlines Icons, which I have little use for. How do I get the Original Toolbar back?

    Is the Navigation Toolbar not being displayed? See below.
    <u>'''Can't see the Menu Bar'''</u> (File, Edit, View, History, Bookmarks, Tools, Help)?
    Turning the Menu Bar on and off is a new feature in version 3.6.
    ''(~~red:Linux & OSX see~~: [[Menu bar is missing]] )''
    <u>''Windows'' Method 1.</u> '''''Hold down''''' the key and press the following letters in this exact order: V T M then release the key
    <u>''Windows'' Method 2.</u> Tap the F10 key, while the Menu bar is visible, choose "View > Toolbars", click "Menu Bar" so that a check mark is placed next to Menu Bar
    <u>''Windows'' Method 3.</u> Tap and release the key. The Menu Bar will be displayed; then choose ~~red:V~~iew > ~~red:T~~oolbars and click on ~~red:M~~enu Bar so that a check mark is placed next to Menu Bar
    The Menu Bar should now be displayed permanently, unless you turn it off again using View > Toolbars. Check mark = displayed, NO check mark = not displayed.
    See:
    http://support.mozilla.com/en-US/kb/Menu+bar+is+missing
    http://kb.mozillazine.org/Toolbar_customization#Restoring_missing_menu_or_other_toolbars
    <u>'''Navigation Toolbar, Bookmarks Toolbar and other Toolbars'''</u> under View > Toolbars. Clicking on one of them will place a check mark (display) or remove the check mark (not displayed).
    <u>'''To display the Status Bar'''</u>, View, then click Status bar to place a check mark (display) or remove the check mark (not displayed).
    <u>'''Full Screen mode'''</u>
    http://kb.mozillazine.org/Netbooks#Full_screen
    Also see:
    ''' [[Back and forward or other toolbar buttons are missing]]'''
    '''[[Navigation Toolbar items]]'''
    '''[http://support.mozilla.com/en-US/kb/How+to+customize+the+toolbar How to customize the toolbar]'''

  • How to erase an app from de Launchpad if I already erased the files and tried to move it to the trash?

    How to erase an app from de Launchpad if I already erased the files and tried to move it to the trash?

    Erased what files? You say "tried" to move it to the trash... I assume that means that you were not successful?
    Removing an app from LaunchPad requires deleting the app. In general, if you're trying to delete an app that was installed from the App Store, simply open the LaunchPad, click and hold on the app icon in the LaunchPad until all the icons start "wiggling," and then click the 'X' at the top left corner of the app's icon. If the app was not installed from the App Store, you need to use whatever uninstaller was provided by the developer of that app.

  • Aperture ate my picture files and they are not recoverable.  The guy at the Genius Bar told me to Trash the App, empty Trash, then go to Purchases and reinstall.  But Purchases says it is "Installed" so it does not let me download it again.  HELP!!!!

    Aperture ate my picture files and they are not recoverable.  The guy at the Genius Bar told me to Trash the App, empty Trash, then go to Purchases and reinstall.  But Purchases says it is "Installed" so it does not let me download it again.  HELP!!!!

    I typed Aperture into Spotlight and sure enough it did show up.
    It looks like it is supposed to be in Apps.
    But it is not there.
    So I clicked on the spotlight Aperture and it opened up the App!!!!
    But I do not know where it is to move it!
    How can I find it?
    While Aperture is running and you are seeing it in the Dock, ctrl-click (or right click) the Dock icon.
    You will see a contextual menu. Click on "Options", then select "Show in Finder".
    And check the "keep in Dock" mark, so you will not lose it from the Dock.

  • I have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    i have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    You can use the same Apple ID for both phones, you would then be able to use the purchased Apps/Content on both phones without having to pay again.

  • How can I transfer video taken with my iPhone to my iPad WITHOUT using a computer or iTunes? I'm going to Europe for a month and want to use my iPhone to take pics and video, then come back to the hotel room and use my iPad to edit/store each evening.

    How can I transfer video taken with my iPhone to my iPad WITHOUT using a computer or iTunes? I'm going to Europe for a month and want to use my iPhone to take pics and video, then come back to the hotel room and use my iPad to edit/store each evening. I don't want to use my iPad to take the video...too large/bulky. And I WON'T have a computer with me...I purchased the iPad to take with me so I could use the RDC to my home computer and avoid taking my computer at all. Is this possible?

    here is a cheaper solution than camera kit and a lot easier if you have WIFI available.
    I use the PhotoSync APP (I think its a $1.99) will transfer videos and photos over WIFI to any other IOS device or even PC/MAC. Great app since I like doing video and photos on my IPHONE and transfer to IPAD2 without synching through computer or doing cloud based storage.
    You can even send photos/videos from your MAC/PC to your IOS devices that way too. Makes it so much easier.
    Here is the link;
    http://www.photosync-app.com/

  • I was using my wifi last night when I got an error message stating my ip address had been taken over.  Then safari stopped working and i can no longer access the internet. I looked at my ip address and it states 000.000.000....can someone please help?

    I was using my wifi last night when I got an error message stating my ip address had been taken over.  Then safari stopped working and i can no longer access the internet. I looked at my ip address and it states 000.000.000....can someone please help?

    Sounds like a bogus pop up. In any case power down your Mac, your modem, your router. Then power back up in 1 minute sequence; modem, router, Mac.

  • My desktop files and folders no longer appear on the screen. I think this is a result of an iPhoto updating.  It appears (from getting info) that now Desktop is being treated like a normal file for which an application to open it must be supplied.  Help?

    My desktop files and folders no longer appear on the screen.  I think this is a result of an iPhoto updating.  It appears (from getting info) that now Desktop is being treated like a normal file for which an application to open it must be supplied.  Can anything be done?  Incila

    You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
    You need to get a new computer or a refurbished one.

Maybe you are looking for

  • How do i remove a web site from creative cloud?

    I have errantly signed up too many websites on my cloud account and have used up all my 5 sites. How do I remove a site so I can use that slot for another live one?

  • Inbound delivery vendor for STO

    Dear Expert, I did the partner configuration for Vendor and STO for site with partner VN-vendor DP-delivery plant. But when I create the STO for site no partner data come out for the PO, the partner data didn't copy out from vendor master. Any advice

  • How to add empty soap header?

    Hello, I created a web service proxy using WSDL and XSD files. Then, I created a sample request from client interface and sent the request as an object to call the web services. However, I am not directly calling the webservices as I am doing it thro

  • Error with stored connection in SQL Dev Version 3.0.03

    Hello, I have downloaded new version SQL Developer / Version 3.0.03 / Build MAIN-03.97 When I try to log into stored connection (I have 3 connections, 2 are working perfectly and the last (most important) is not working (in previous version of SQLDev

  • Does Lightroom 4.4 support Sony a6000 RAW files

    Hello Group, I have tried and tried to get my version of Lightroom 4.4 to read my RAW files from my new Sony a6000.  I have updated my adobe programs and still have had no luck.  Do I need a newer version of Lightroom?  I am not sure if there is some