ORACLE8I - LONG TYPE을 LOB TYPE으로 CONVERSION하는 방법(TO_LOB)

제품 : ORACLE SERVER
작성날짜 : 2002-04-12
ORACLE8I - LONG TYPE을 LOB TYPE으로 CONVERSION하는 방법(TO_LOB)
===============================================================
Purpose
Long type의 data를 lob type으로 conversion하는 to_lob function에 대해
알아보자.
Explanation
Oracle8 부터 long 이나 long raw type과는 별도로 lob type이 추가되었다.
long 이나 long raw type을 clob 또는 blob type으로 변경하기 위해서는
Oracle8 에서는 데이타를 다시 입력해야 했지만, Oracle8i 에서는 추가된
TO_LOB function을 이용하여 간단히 data migration을 할 수 있다.
TO_LOB function은 보통 create table .. as select .. 문장이나
insert into .. select .. 문장에서 쉽게 사용할 수 있다.
Example
[예제1] long type의 데이타를 clob type으로 옮기는 방법
아래의 예제에서 type만 long raw와 blob 로 바꾸어도 가능하다.
SQL> create table long_data (c1 number, c2 long);
Table created.
SQL> desc long_data
Name Null? Type
C1 NUMBER
C2 LONG
SQL> insert into long_data values
2 (1, 'This is some long data to be migrated to a CLOB');
1 row created.
SQL> create table test_lobs
2 (c1 number, c2 clob);
Table created.
SQL> desc test_lobs
Name Null? Type
C1 NUMBER
C2 CLOB
SQL> insert into test_lobs
2 select c1, to_lob(c2) from long_data;
1 row created.
SQL> select c2 from test_lobs;
C2
This is some long data to be migrated to a CLOB
[예제2] long type을 clob type으로 바꾸어 table 생성하는 방법
SQL> create table clob_data
2 as select c1, to_lob(c2) c2 from long_data;
Table created.
SQL> desc clob_data
Name Null? Type
C1 NUMBER
C2 CLOB
[예제3] long raw type을 blob type으로 바꾸어 table 생성하는 방법
SQL> desc image_data
Name Null? Type
C1 NUMBER
C2 LONG RAW
SQL> create table blob_data
2 as select c1, to_lob(c2) c2 from image_data;
Table created.
SQL> desc blob_data
Name Null? Type
C1 NUMBER
C2 BLOB

You may not insert LONGs into a table that are selected from a remote database. You can simply SELECT LONGs across a DB link, but you just can't INSERT... SELECT them.
Greg Pike
http://www.singlequery.com

Similar Messages

  • Long, Raw, Lob Data types in OWB.

    Hi All,
    Is it posssible to load data of the type LONG, RAW, LOB etc from a source text file or oracle source table to a target text file or oracle target table.?
    I believe this option is not available in OWB 9.0.2.56 version.
    Thanks in Advance.
    Regards,
    Vidyanand

    Good morning Rita,
    These datatypes should be supported by 'Paris'.
    When saying "nor can I view the data in the source", is that using a SQL-client (SQL*Plus, TOAD, whatever)?
    I'm also on the beta program but haven't been able to do anything yet (hopefully tomorrow), but what I remember reading is that in case of problems you could directly email a member of the OWB-development team (Nikolai Rochnik I think it was). If that thought is correct, you might want to address him (or any other person in that team).
    Good luck, Patrick

  • Data type conversion in oracle 9.2.0.8

    Team,
    can we convert oracle 9.2.0.8 LONG RAW and LONG to lob types in oracle 9.2.0.8
    Thanks,
    Aj

    Yes, you can and should be [migrating LONG to LOB in Oracle 9.2|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl08lon.htm].
    Justin

  • Using long type field

    hi, supposed that i have a table that have one field LONG type. now i want to use this long type field like that ;
    insert an exe file about 25-35 mb to this long type field. and then i want to take and down this exe file under c:\try directory and execute this file. i use forms developer as tool
    how can i do ? coluld you say any idea ?

    Does it have to be a LONG?
    LONGs are difficult to use properly. There are many limitations. LOBS (BLOB or CLOB) are generally much easier and more consistent to use.
    Oracle has published 2 documents that are useful for you. The 'Application Developer's Guide - Fundamentals' and 'Application Developer's Guide - Large Objects' manuals include sample code.
    And finally - could you use WebDAAV (Oracle's implementation is ORADAV). That allows you to display a column as a Windows drive.

  • I can no longer type after typing a URL and autocomplete not finding a matching URL. How to fix that?

    After I open Firefox I start typing the URL. After each letter I see autocomplete suggestions. Imagine I type "g", then "o" (google is shown as autocomplete), but then I enter "a". Since I have no pages that begin with "goa", autocomplete is hidden and the problem is, I can no longer type anything. All my key strokes are now ignored (backspace, enter... it dosen't matter). But I still see the cursor blinking after "goa".
    I have discovered that Firefox must be focused on some other interface element (not in the address bar), because if I press the TAB key, the focus is again shifted to the address bar and I can continue typing. Sometimes I have to press TAB 2 or 3 times while entering an address to be able to write what I want. It looks like every time autocomplete is closed, the program focus leaves the address bar.
    I've been having this problem for at least 4 or 5 versions of Firefox and it does not happen on every Firefox session. It can be solved by closing Firefox and opening it again. Pressing the TAB key has become kind of a reflex, so it's just annoying and I can work around it.
    But why is this happening?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Implicit and explicit Type conversion using Type object in heap

    Hi,
    I am surprised how Implicit and explicit Type conversion works using Type object in heap. for example when implicit type conversion occur what pointer it returns to object and similarly with explicit type conversion.

    Hello,
    >> I am surprised how Implicit and explicit Type conversion works using Type object in heap.
    For Implicit conversions: Typical examples are conversions from smaller to larger integral types, and conversions from derived classes to base classes. For the first one, the reference would be different which means it would return a different pointer to
    a new object. For the reference type, it actually points to the same memory location, you could use the object.ReferenceEquals() to check it.
    For Explicit conversions (casts):Typical examples include numeric conversion to a type that has less precision or a smaller range, and conversion of a base-class instance to a derived class. For first one, it would perform the same with implicit conversions.
    While for the conversion of conversion of a base-class instance to a derived class, actually, there's no built-in way to do this conversion.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Since I upgraded to os 5.1 for my iPhone I can no longer type in reminders. Any suggestions how to get around having to use siri for reminders?

    since I upgraded to os 5.1 for my iPhone I can no longer type in reminders. Any suggestions how to get around having to use siri for reminders?

    Unfortunately, I have a very similar problem. Since I upgraded to os 5.1 on my new iPhone 4S the reminders screen will not add new reminders or scroll up and down. What's more strange is the screen will still scroll side to side allowing access to the Completed list, and both the Completed list and Date functions work normally so this must be an upgrades glitch.

  • I can no longer type in unlimited information on my adobe reader in pdf. At one time this was an option, it would give you an icon that would allow you to type in more information. This is no longer an option. What happen?

    I can no longer type in unlimited information on my adobe reader in pdf. At one time this was an option, it would give you an icon that would allow you to type in more information. What happen?

    That is not an option of Adobe Reader, but the way a PDF is created.

  • After renaming a file extention from .jpeg to .jpg I can no longer type ...

    After renaming a file extention from .jpeg to .jpg I can no longer type in any of the finder related editable fields/boxes. I can still type in my open applications fields.
    This problem also happens when I happen to find a file that has been named, for instance, 2008jpg. When I add the period to have the file read correctly as 2008.jpg, a warning box appears asking - {*Are you sure you want to change the extention from ".jpeg" to ".jpg"?* If you make this change, your document may open in a different application.} Two radio buttons are available within this warning box that read - 1 - {Use .jpg}(it is not color coded, which means it must be selected manually. - 2 - {Keep .jpeg}(it is colored w/my Blue highlight color, which means it will be selected if the Enter Key is used.
    The warning box does Not appear if I remove the period from a file and not again when i re-add the period to that same file.
    After trying to make these types of edits to the name of any file, with any of the various extentions available for files in our digital world, I usually get an anomaly where myability to type in the Finder ceases to be a possibility.
    I have found that I can Force Quit the Finder for a quick fix, but, I'm not sure that this Typing problem should have to be dealt with at all by this quick fix. Is this an issue with the Indexing in Spotlight, which seems to be giving many users problems?

    I downloaded and tried EasyFind. It works but it took 30+ seconds to complete finding 3 files that are on One of my Five 25+ Gb partitions of my 130 Gb Seagate Cuda(Really 160 Gb, but my Sawtooth will only recognize 130) I figured that if I ever got a better box, I could reformat it to see the whole 160 Gb. So, as far as I can see, Spotlight's indexing scheme which finds the files instantly is probably preferable. Spot light allows you to rename your files from within it's app window. I've always thought that was pretty powerful. Could my doing so be causing me any issues? As i said it is the inability to Type in the Finder that seemed to be caused from changing file Extentions that were mis-written. Maybe it was a delayed reaction to my renaming files in the Spotlight app? I've done both on occasion.
    As for these .DS_Store files. Apparently you can NOT stop them from being written to any folder that you touch/open/view during a days session. But, as a function of the OS, are the essential to have in their respective folders Forever? I've looked at the .DS_Store terminator app briefly and assume that getting rid of these files won't hurt the regular operation of my OS. They will just be re-written if I ever have to go back to any particular folder again. But, apparently, some have said that if the plan on burning a CD or DVD of their data, they delete the .DS_Store files first and then do the burn.
    I'm thinking from your having suggested this tremination app that you suspect that my having all of these ,DS_Store files could be a situation where any of them could have become corrupted and terminating them regularly should be part of my regular maintenance.
    Does that sound like I'm understanding what I can do?
    TIA

  • Why can I no longer type in additional information on my pdf form. It will only allow me to type in limited information.

    Why can I no longer type in additional information on my pdf form. It will only allow me to type in limited information.

    Duplicate post.
    Why can I no longer fill in additional information on my adobe forms on pdf. At time this was an opposition. It will only allow me to type limited information?

  • When I disable my left windows key for gameing using Microsoft keyboard and mouse software, I can no longer type in firefox. How can i fix this?

    Microsoft Keyboard and Mouse Software that you install with Microsoft keyboard and mice, (latest version) allows you to disable your windows key so that you don't accidentally hit it when gaming. When I take advantage of this feature, I can no longer type in Firefox. Typing in Firefox is completely disabled. Other browsers, windows, applications work, but not Firefox. What is it about the windows key that firefox needs for typing. Strange problem, but annoying because I have to use a different browser while game. Certainly not a deal breaker, but kinda strange.

    Try:
    *[[/questions/947513]]

  • After the newest update, i can no longer type in traditional chinese ( pin yin), does anyone else have the same problem?

    after the newest update ( iso 7) , i can no longer type in traditional chinese ( pin yin), does anyone else have the same problem?

    I downloaded and tried EasyFind. It works but it took 30+ seconds to complete finding 3 files that are on One of my Five 25+ Gb partitions of my 130 Gb Seagate Cuda(Really 160 Gb, but my Sawtooth will only recognize 130) I figured that if I ever got a better box, I could reformat it to see the whole 160 Gb. So, as far as I can see, Spotlight's indexing scheme which finds the files instantly is probably preferable. Spot light allows you to rename your files from within it's app window. I've always thought that was pretty powerful. Could my doing so be causing me any issues? As i said it is the inability to Type in the Finder that seemed to be caused from changing file Extentions that were mis-written. Maybe it was a delayed reaction to my renaming files in the Spotlight app? I've done both on occasion.
    As for these .DS_Store files. Apparently you can NOT stop them from being written to any folder that you touch/open/view during a days session. But, as a function of the OS, are the essential to have in their respective folders Forever? I've looked at the .DS_Store terminator app briefly and assume that getting rid of these files won't hurt the regular operation of my OS. They will just be re-written if I ever have to go back to any particular folder again. But, apparently, some have said that if the plan on burning a CD or DVD of their data, they delete the .DS_Store files first and then do the burn.
    I'm thinking from your having suggested this tremination app that you suspect that my having all of these ,DS_Store files could be a situation where any of them could have become corrupted and terminating them regularly should be part of my regular maintenance.
    Does that sound like I'm understanding what I can do?
    TIA

  • The priority of different data type conversion

    Hi All,
    I want to know the priority of data type conversion rule. if in an expression, I have several kind of data type( I, P, F,N..).
    Then finaly, all the data object will convert to which data type?
    I don't know the priority of data conversion.
    E.g.   data a type i. data b type p. data c type f.
             a = b + c.
    or    data d type p, data e type f.
          if ( d > f ).
    Then who will convert to who's type?
    Thanks and Regards.
    Aaron

    For expressions, the right term in SAP is "calculation type", it's explained here : [abap help - determining the calculation type|http://help.sap.com/abapdocu_70/en/ABENARITH_TYPE.htm]. SAP takes the "biggest" type of all variables in the expression. It can be I, P or F (smallest is I, biggest is F).
    Conditions are handled differently, just using data type conversion (see link given above by Abhishek), SAP converts from smallest to biggest type (in your case, it converts P to F and compares the two F variables).

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • I can no longer type messages.  I have tried deleting to see if I have too many saves messages.  That did not help.  I also cut off the phone and turned back on.  That did not help.  Ideas?

    I can no longer type messages.  I have tried deleting to see if I have too many saves messages.  That did not help.  I also cut off the phone and turned back on.  That did not help.  Ideas?

    http://www.bubblews.com/news/874646-apple-is-having-issues

Maybe you are looking for

  • Reformatting

    Hello, I need to reformat my macbook but the option is greyed out in the disk utility. I was wondering if there is any way to do that.

  • Crop And Straighten Photos - Changing parameters / Editing Script

    Hi. I am currently using the Crop and Straighten Photos automation to crop scans of 10 to 12 maps that are scanned on a large flat bed scanner. A lot of the plans have rough edges and aren't always completely square. Is it possible to allow a toleran

  • Photoshop & general CS4 funkiness in XP that started a few months ago

    This is a multi-part pain in the butt. Part one: Sporadically, PShop CS4 decides it will not open a file. I can try and open it through the Open Dialog... No Luck. I can go and find the file in XP's file manager and choose "Open With" select Photosho

  • Contact Sheet- I'm stumped!

    Hey gang- Okay, after using iPhoto from day one, I thought I could answer any question. So imagine when today my mother-in-law asked me something that sounded soooo simple! She wants to print 6 photos to a single-page, using the entire page. I quickl

  • ITunes 10.5, Creating iPod version of podcast makes iTunes not responsive

    MacBook Pro (2.5 GHz Intel Core Duo with 4 GB RAM) running 10.6.8.  iTunes version 10.5.  After downloading a 71MB .mp4 podcast through subscription, when I attempt to make an iPod version of the podcast (Advanced > Create iPod or iPhone Version)  iT