The most effective way from varchar2 to CLOB?

this is my table's TAB structure on Oracle 10g r2:
TAB_ID (PK),
TAB2_ID (FK constraint to TAB2(TAB2_ID), index created),
TEXT varchar2(4000)
What is the most effective way to convert varchar2(4000) column to CLOB column?
1. create new table TAB_NEW with column TEXT as CLOB,
then insert /*+ APPEND */ into TAB_NEW SELECT * FROM TAB,
then rename table TAB to TAB_OLD,
then drop constraint and indexes
then rename TAB_new to TAB
then add constraints primary key and foreign key,
then add index on TAB2_ID
then drop table TAB_OLD
OR
2. rename column TEXT(varchar2) to TEXT_OLD
then add column TEXT(type CLOB)
then update(how the most effective?) TAB set TEXT=TEXT_OLD
drop column TEXT_OLD.

1 will work, as you can assign a VARCHAR2 to a CLOB and Oracle will convert it.
2 is redundant.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • What is the most effective way to get my imac 2 ghz intel core duo 2 10.4.11 to be able to run 10.5 and sync with my iphone 4s?

    What is the most effective way to get my imac 2 ghz intel core duo 2 10.4.11 to be able to run 10.5 and sync with my iphone 4s?

    As your Mac should run Snow Leopard provided it has at least 1GB memory, that would be a good deal easier and very much cheaper than trying to find a 10.5 install disc.
    Snow Leopard costs $30 approx from the online Apple store (£26 if you're in UK)
    You'll need to update Tiger to 10.4.11 with the combo installer first (unless you're just erasing the disc and starting fresh) You can then update SL from 10.6.3 to 10.6.8 with its combo installer.
    For comparison, 10.5 Leopard is currently running about $130 from Apple (if still available) and more on Amazon etc.
    This info for Leopard courtesy of TexasMacMan;
    Mac OS X 10.5 Leopard installation system requirements
    http://support.apple.com/kb/TA24950
    Leopard is no longer available at the Apple Store but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753).
    If you can't obtain a retail install DVD from Apple, look on eBay or Google the installer part numbers to possibly find at an on-line store. Here's what to look for:
    MB427Z/A  Leopard 10.5.1 install DVD
    MB576Z/A  Leopard 10.5.4 install DVD
    MB021Z/A  Leopard 10.5.6 install DVD (single user)
    MB022Z/A  Leopard 10.5.6 install DVD (5-user family pack)
    Installing Mac OS X 10.5 Leopard
    http://support.apple.com/kb/HT1544
    Mac OS X 10.5 Leopard Installation and Setup Guide
    http://manuals.info.apple.com/en/leopard_install-setup.pdf
    After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update

  • What is the most effective way to write Statement to catch and reverse errors during query excution?

    Hello my friends:
    I am wondering what is the most effective way to deal with errors, specifically in a
    Stored Procedure.
    I wrote something like this:
    BEGIN TRY
    BEGIN TRANSACTION
    /*My statements goes in here*/
    IF ERROR_NUMBER() = 0 -- Do I need this line?
    COMMIT TRANSACTION;
    END TRY
    BEGIN CATCH
    IF ERROR_NUMBER() > 0 --Do I need this line?
    ROLLBACK TRANSACTION;
    END CATCH;
    It would make sense using the if Statement when attempting to log errors.
    Just too many variations.
    Thanks

    Also read this great article
    http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/05/13/your-try-block-may-fail-and-your-catch-block-may-be-bypassed.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • What's the most effective way to speed up AVCHD video editing?

    Hello Everyone,
    I'm having the same problem, my wife and I have a small wedding videography company, I film jobs on weekends when I'm not working full time and my wife stays home with our 2 year old daughter and edits during the week. 
    When jobs come in we both are using our macbook pro's for the import process because it takes SOOO long to import all the avchd clips.  We're filming with the Panasonic HMC40 shooting in 720/30p on Class 10 16GB SDHC Cards.
    I have an early 2008 macbook pro, 2.4Ghz Core 2 Duo 2GB of ram, and my wife has a 2010 unibody with a dual core i5 w/ 4GB of ram.
    As a test, I imported an 8 minute and 47 second clip in my machine, and the import takes 20:39.  I went to my local apple store and ran the same import test on brand new machines and here are the results:
    mbp Core 2 duo 2GB ram time: 20:39 (my machine)
    mbp dual core i5 4GB ram time: 7:08 (my wife's machine)
    mbp quad core i7 4GB ram time: 4:50
    mba core 2 duo 1.86Ghz 2GB ram SSD 64GB drive time: 12:17
    imac quad core 2.7Ghz 4GB ram time: 4:54
    imac quad core 2.8Ghz 3GB ram 4:27
    mac pro 2.8Ghz 3GB ram 3:42
    I watched the quad core i7 macbook pro's performance monitor, and at one point it had 63 iMovie threads running to import the footage.  The biggest bottleneck for importing avchd seems to be the processor.  With an import time of about have of the real time, that has the biggest appeal to me, but comes at a starting price of $1799 + tax, and is expensive. 
    What I'm looking for is the most cost effective way to cut down on import and export times for either new hardware or software.  I haven't tested the elgato h.264 HD encoder yet, nor have I tested the new Final Cut X.  Has anyone done this? What about Adobe Premier Elments or Premier Pro
    Our compeditors are offering 'same day edit' services, and making basically a trailer of the events that happen at the ceremony, then editing them on site in a 3-4 hour time window between the ceremony and reception, then using a projector and screen to show that trailer at the beginning of the reception, usually added to the slide show. 
    That's the kind of thing that we want to be able to do for our customers, but also to cut down the massive amount of editing time it takes to get every finished product out the door.
    What does everyone think?  Is the elgato h.264 HD encoder worth it?  Is there a more professional avchd / h.264 hardware / software solution that can speed up the import process faster?
    I'd love to know everyone's thoughts.
    Thanks.
    Chris
    [URL="http://freedomvideography.com"]Wisconsin Wedding Videography[/URL]

    One thing you might consider...
    Go to Final Cut Pro X.
    In FCP 10, you can import AVCHD and begin editing immediately. You can edit natively in AVCHD if your needs are very simple, but most people would use FCP to "optimize" the AVCHD to ProRes 422, which is an intermediate codec like Apple Intermediate Codec, but provides higher quality. The optimizing to ProRes 422 as well as analyzing for stabilization, sound, and color takes place in the background if you have cores available.
    But you can edit immediately, and as the optimized clips become available, FCP will automatically use them instead of the AVCHD clips.

  • Playing my music in the most effective way - after some help!

    Hello
    I'm new to this game (technology!) and have a couple of questions that I would appreciate any help with to make the most of my iPad Christmas pressie!
    Firstly. Can I upload my external hard drive of music onto cloud and is there a maximum. I have about 300gb of tunes on the hard drive! I would obviously like to then play through iPad.
    Secondly, I would love to play the above tunes on my stereo system. It's quite old school but a great set of speaker and amp, Now the mrs has put the stereo away in a cabinet so not easy to get at! One option I was thinking is to get a Bose speaker that can work blue tooth. Does anyone know if I can connect the Bose to my old amp so also run off my wall mounted speakers at the same time. Not sure if it works that way round. Or any other advice
    Any help massively appreciated
    Cheers
    Luke

    I just realized I have a different iCloud account set up on my phone. The one on my Macbook is the one associated with my ITunes account. Could this be the problem?

  • What is the most effective way to consolidate my iTunes library (there appears to be 2-3 separate origins)?

    Hello all!,
    I've come across a problem regarding the source of my Music files on my MacBook Pro, finding that my fairly large (76 GB) iTunes library is made up of files from a large range of locations.  I've had this Macbook for ~3 years now & have never necessarily worried about the amount of audio on the harddrive.  As I noted, I have 76GB of music on iTunes, but the "Audio" section of my harddrive is 215GB. Based on looking at the iTunes/iTunes Media section of my files I've come to the conclusion that my process of finding and adding music to my library has resulted in a large amount of duplicates and/or multiple locations.
    I began by going through and deleting unwanted songs from my library, to see the effect it would have on the overall "Audio" on my harddrive. This didn't do much, leaving me with a ~54GB iTunes library, but a recorded 191.4GB of audio on my harddrive. It appears that the "Music" sub-folder of "iTunes Media" is a duplicated, older version of my iTunes library but I'm weary about deleting it in fear that the songs sources will end up "broken" and they won't play or sync.
    I've browsed other questions and found scripts for similar situations but I'm not sure exactly how to go about using them, or if they're necessary/correct for this situation. What is the suggested manner for organization of music in iTunes? The suspected duplicates folder is located under "Music -> iTunes -> iTunes Media -> Music" and this seems like far too many folders for a library of relative simplicity.
    The last question I have is if the albums I download are staying in my "Downloads" folder when adding them to iTunes, creating yet more duplicates (rather than simply being transfered to the iTunes folders)? I'd appreciate any help, hopefully I was clear about the problems I'm facing. The system I've been using works, but I want to get all of my audio files cleaned up properly.
    Thanks!

    "Audio" is more than just your iTunes files. Audio files for other apps (like Garageband, Office or Roxio Toast) can add to the overall size of "Audio".
    The iTunes Media folder should be within a few gigs at most, of the size of what your Library shows. It won't be exact because iTunes uses binary calculation to determine size and Finder uses Decimal. (1024mb vs 1000mb for a gigabyte)
    My iTunes library is 168Gb in iTunes - the files are 191Gb in FInder.
    Your iTunes files should be in [user]Music/iTunes/iTunes Media/ by default, but you can choose ANY ONE location, on an internal or external hard drive, as long as iTunes is properly pointed to it as your Library. The Library files (.itl, .xml, .itdb, and artwork) should still remain in the default location.

  • What is the most effective way to get ospf to function and what is the basic command structure

    I am doing a project of ospf and need to know if I am on the right tract somehow these commands are not working and wondering if I am doing something wrong.

    Hello,
    I would say the basic configuration for OSPF should be:
    1. router ospf  1
             2.   Router-id 2.2.2.2 ( if you want to hardcode the router-id else you can go with the default which would be the highest interface on your router)
             3.  Network  192.168.0.0 0.0.0.255 area 0 (telling the router * I care about the 192.168.0 part of my ip and the last part can be anything thus the 255)
        4.      Net   192.168.2.2 0.0.0.255 area 0 (telling the router * I care about the 192.168.2 part of my ip and the last part can be anything thus the 255)
    OR for the 192.168.0.0 and 192.168.2.0 you could just have 192.168.0.0 0.0.255.255 meaning I only care about 192.168 and 0.0 can be anything.
    The four lines above would be my basic config for ospf. Also have a look at these links, they provide some insight into ospf and how it should be configured. http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_ospf/configuration/12-4/iro-cfg.html#GUID-588D1301-F63C-4DAC-BF1C-C3735EB13673
    http://www.cisco.com/en/US/tech/tk365/tk480/tsd_technology_support_sub-protocol_home.html
    I have also experienced that I cannot configure all OSPF commands on PT but prob GNS3 allow all configs.
    HTH.
    DJ.

  • What's the most effective way when leaving feedback?

    should I put all of my eggs in one basket and state all of my wishes and concerns in one message, or send in separate feedback msgs for each app/feature request? i have multiple issues with overall function, mail, sms, safari, bluetooth, and calendar.
    thanks!

    I would break up your feedback requests (via the Feedback link please) into 1 or two items at a time instead of one long list of multiple requests.

  • What's the most efficient way to serve a file from a servlet?

    I have a servlet that does various different things depending on the needs. Sometimes it dynamically generates content, and sometimes all it does is send a file out, with no alteration.
    What is the most efficient way to just send a file?
    One option:
    OutputStream os = response.getOutputStream();
    InputStream is = new FileInputStream(...)
    (send all the bytes from is to os, the regular way using a buffer)Another option is to say:
    RequestDispatcher rd = response.getRequestDispatcher(fileName);
    rd.forward();Any other options? What's the prefered way of doing this?
    I know the rule of "don't optimize too early" but this is a situation where we need to get the maximum amount of files served with the hardware we have, and it's going to be a lot of static files, so efficiency is important.
    Thanks

    Ok, that's what I thought. It would be nice if there were a "response.sendStream(InputStream input)" method in the ServletResponse class. Even nicer would be a sendFile or sendChannel or something. This is probably a common usage and it's a place where the container has many opportunities for optimization. For example, it could call the operating systems send_file kernel call so the entire transfer would be done directly from the disk controller to the ether card (on systems that support that).
    For now I'll just do my own buffered copy.

  • What is the most sensible way to extend a wifi signal. I am in a cinderblock house and I have to buy something that will give me a single network but added range from my airport extreme base station.

    What is the most sensible way to extend a wifi signal. I am in a cinderblock house and I have to buy something that will give me a single network but added range from my airport extreme base station.

    Use an Airport Express. Configure the AEBS to allow it's wireless network to be extended. This is a dropdown menu option under the Wireless tab. Configure the Airport Express to Extend an Existing Network also under it's Wireless tab. You will need to provide the name of your network used in the AEBS as well as the network's access password.

  • Moving content from iMovie to iMovie - what's the most efficient way?

    If I edit and create movies in iMovie08 on one iMac and I want to transfer the content to iMovie08 another iMac 200 miles away , what's the most efficient way? I prefer not to burn DVDs, because I want to do further work on the movies on the second iMac's iMovie (so I can share them with iTunes and sync them with Apple TV).

    >PDPageAddCosContents(destPage, PDPageGetCosContents(srcPage));
    Does this method (PDPageGetCosContent) exist? It would be easy enough
    to create, but I don't see it in the document.
    More seriously, I have a vague memory that it is a Really Bad Thing to
    share the same Contents objects between multiple pages. Maybe
    something to do with page deletion, can't remember.
    >PDPageAddCosResource(destPage, PDPageGetCosResources(srcPage));
    These two methods are not symmetric, and PDPageAddCosResource doesn't
    work that way, sadly...
    Aandi Inston

  • I have an ipod classic with 4gb, it is full. What is the most economical way to upgrade to at least 16gb

    I have an ipod classic with 4gb, it is full. What is the most economical way to upgrade to at least 16gb?
    (I don't want to delete anything)

    To recover the photos from an iPod Classic you'll need to use third-party software and the photos gained will be quite low resolution.
    See https://discussions.apple.com/docs/DOC-3991 for possibilities.

  • What is the most efficent way to create both a standard and HD DVD

    Hi,
    I'm just getting into HD video editing, and I have relatives who will be several years behind me. I will be making HD DVD's for myself to use, but I will also need to make standard DVD's to send to my relatives.I am assuming that the HD DVD's I create will not play in a standard DVD player. I may be wrong. However, If this is correct, is there a particular point in the process of working with Encore where I can make that choice, create the DVD, and then go back and alter it in order to create the other type without destroying and having to redo everything that was done up to that point?

    Thank you Hunt. Being ahead of most of the rest of the world and getting the best technology out there can be a pain sometimes. Reading through Jon Geddes' article left me scratching my head several times, and some of it went way over my head, but I'll keep at it, until it sinks in. Some language, terms, and shorthand, I'm sure are simple to understand to a lot of people, but I'm not in that catagory. I'll just keep working at it. 
    Terry Lee Martin
    Date: Sun, 18 Oct 2009 13:39:08 -0600
    From: [email protected]
    To: [email protected]
    Subject: what is the most efficent way to create both a standard and HD DVD
    I would edit the Project in HD in PrPro. The BD authoring part will be straight workflow.
    For the SD DVD-Video, you have a few choices. You can Export to DV-AVI Type II for Import into a new Encore Project for the DVD. Some feel that PrPro does not do a good job at down-rezing from HD to SD. For a workflow that will likely yield better quality, see this http://www.precomposed.com/blog/2009/07/hd-to-sd-dvd-best-methods/. If you have PrPro/Encore CS4, then Jeff Bellune's /thread/487134?tstart=0 might be useful to you. Just follow the links to the tutorial.
    Good luck,
    Hunt
    >

  • Change Parameter from VarChar2 to CLOB

    Hi,
    I have a function csvToArray which takes a csv string and converts it to an array.
    PROCEDURE csvToArray(p_csvString IN VarChar2,
    p_count OUT PLS_INTEGER,
    p_array OUT ARRAY_T) IS...
    Unfortunately the size of the csvString being passed in exceeds 32K, so I was thinking about changing the type of the csvString from Varchar2 to CLOB,i.e
    PROCEDURE csvToArray(p_csvString IN CLOB,
    p_count OUT PLS_INTEGER,
    p_array OUT ARRAY_T) IS...
    The procedure only uses the string functions instr and substr to find the elements of the csv string to place in an array.
    I've tested the change and it works, but is there anything I should consider with the change to the data type, or will the above always work fine? The extreme max size of p_csvString would be around 150K.
    Database version is 10.2.0.4.0
    Thanks

    Hi,
    This test maybe helpful
    Passed Length 65K test
    create or replace procedure my_pro ( pclob clob)
    is
    begin
      dbms_output.put_line('clob passed LEN:' ||
       dbms_lob.getlength(pclob) );
    end;
    Procedure created.
    SQL> exec my_pro( to_clob(lpad('x',32767,'c')||lpad('x',32767,'c')||'x'));
    clob passed LEN:65535
    PL/SQL procedure successfully completed.SS

  • The most compatible  way of offering short movies on a website?

    Hi everyone,
    I am working on a website which offers links to short movies
    which the admin has uploaded. they are in mwv/mpg/avi format. I am
    using this object method, I can see them on my systems, but the
    client cannot make it to work on their systems. I am looking for
    the most compatible way of linking and displaying short movies on
    the site. work with PC and mac.
    this is my current method that apparently is not fully
    compatible:
    <cfoutput><embed src="Media/#MediaParam#"
    width="408" height="354" autostart="1"
    showstatusbar=1></embed></cfoutput>
    any help is appreciated in advance..

    can the data go from the drive direct to the ATV2?
    no.
    iTunes must be running to fetch and serve the content to ATV.
    I ask as its far easier to connect a ATV2 and a Network drive via cat5, however itd be nice to not have to plug a mac in as well.
    if your wireless network is n-capable and doesn't suffer interference problems, that scenario might work.
    Possible try to get a older ATV?
    good luck with that they are hard to come by. try eBay or something.

Maybe you are looking for

  • Ipods suck : Considering buying a Creative Zen 32gb, I have some SD questions

    ? My? 20gig ipod died......again. I never realised how bad ipods are . They are WHITE DEATH So i'm looking for a replacement. I used to have a Vision M 30gb? but trying to find a new one? is impossible and they are VERY expensi've as they are so rare

  • Three monitors - two for Premiere, one as Reference, from Geforce GFX 570 - possible?

    My new system for Prodcution Studio CS5.5 has a Geforce GTX570 graphics card to which I've attached my two monitors (via DVItoVGA convertors) I've read posts on this forum where people have mentioned adding in an extra graphcis card to drive a separa

  • Autocomplete: working funny in flash player 10

    Hi, does anyone have any issue using the flex autocomplete component running it in flash player 10. It works great when i compile it for player 9 but acts really weird with 10. I am attaching the swf to show you whats happening. Thanks, Samina

  • BLANK MAIL MESSAGES USING OUTLOOK

    Hi - I apologise for throwing this one in again - but I need to get an answer and haven't been able to find anything yet. I am using a MacBook Pro with OS x Ver 10.6.8.  For mail within our company we use MS Outlook.  verything was fine up until a fe

  • Some Previews unavailable in Import

    Hi Iam Russell. Some of my imported photos are showing blank in preview mode before I import, reading Preveiw unavailable for this file. Does this mean when I import they wont be imported. Message was edited by: Geoff the kiwi to clarify topic