[ 10g ] How to make dbms_lob.erase trim fragment away?

Hello!
I'm trying to remove some parts of CLOB with DBMS_LOB.ERASE, and it obviously just replaces fragment with spaces. This behaviour is stated in manual, but the fact is I need to actually REMOVE this fragment. More to that, I also need to insert some data in the middle of the CLOB. Of which, obviously, DBMS_LOB.WRITE isn't capable to do.
I've googled that 11g has some vague new functions DBMS_LOB.FRAGMENT_DELETE and DBMS_LOB.FRAGMENT_INSERT, doing what I need. But I'm on 10g. So, is there way to do what I need without tedious blob copying/trimming?

I've written rough replacements for dbms_lob.fragment_delete and dbms_lob.fragment_insert. Be glad for any advise.
procedure clob_fragment_delete(l_clob in out clob, l_amount in integer, l_offset in integer)
is
  l_len integer := dbms_lob.getlength(l_clob);
begin
  dbms_lob.copy(l_clob, l_clob, l_len - l_offset - l_amount, l_offset, l_offset + l_amount);
  dbms_lob.trim(l_clob, l_len - l_amount);
end;
procedure clob_fragment_insert(l_clob in out clob, l_amount in integer, l_offset in integer,
                               l_buffer in varchar2 character set l_clob%charset)
is
  l_len integer := dbms_lob.getlength(l_clob);
begin
  dbms_lob.copy(l_clob, l_clob, l_len - l_offset, l_offset + l_amount, l_offset);
  dbms_lob.write(l_clob, l_amount, l_offset, l_buffer);
end;

Similar Messages

  • How to make a function return number(10,0) data type (ORACLE 10g)?

    With 10g, how to make a function return number(10,0) data type?
    here is the function, it returns a number type :
    create or replace FUNCTION Get_portfolio_Id3 (p_HistObjTable In Varchar2,p_LHISTOBJID IN NUMBER) RETURN view_cpu_STD_Asset.LPORTFOLIOITEMID%Type IS
    v_Id view_cpu_STD_Asset.LPORTFOLIOITEMID%Type;
    BEGIN
    If p_HistObjTable ='amPortfolio'
    then v_Id:=p_LHISTOBJID ;
    elsIf p_HistObjTable = 'amComputer' then
    select litemid into v_Id from smcdba.amComputer c where c.LCOMPUTERID=p_LHISTOBJID ;
    else v_Id:=-99;
    End If;
    RETURN v_Id;
    END Get_portfolio_Id3;
    Thanks.
    Message was edited by:
    user631701

    create or replace FUNCTION Get_portfolio_Id3 (p_HistObjTable In Varchar2,p_LHISTOBJID IN NUMBER) RETURN view_cpu_STD_Asset.LPORTFOLIOITEMID%Type IS
    v_Id view_cpu_STD_Asset.LPORTFOLIOITEMID%Type;
    BEGIN
    If p_HistObjTable ='amPortfolio'
    then v_Id:=p_LHISTOBJID ;
    elsIf p_HistObjTable = 'amComputer' then
    select litemid into v_Id from smcdba.amComputer c where c.LCOMPUTERID=p_LHISTOBJID ;
    else v_Id:=-99;
    End If;
    RETURN round(v_Id);
    END Get_portfolio_Id3;

  • My volume icon has been on my screen since yesterday, and won't go away! It is in the way of my reading! How do I get it to go away??

    Hi there.. need some help with my iphone 4. I was using mapquest on a road trip yesterday, and the volume icon showed up on my screen, and now won't go away. The volume buttons work (increase/decrease volume), but the volume bar no longer corresponds to the increase/decrease in volume. I can't figure out how to make the volume icon go away. It is superimposed on other apps so it makes reading (e.g. mail, news) annoying since I have to read around the icon. Can someone give me some advice on what to do? Thanks!

    Have you tried turning your phone off and back on?
    Reset the phone hold the home button and the sleep button in until the phone turns off ignore the "slide to power off" message and keep holding the buttons, the phone will reboot

  • I want to upgrade my mac os 10.6.8 to 10.8.2 , will this erase all my files,apps,etc ? and will i loose the licence of microsoft office 2011, how to make a backup on a pendrive ?  I have files of approx 180 gb , THANK YOU

    I want to upgrade my mac os 10.6.8 to 10.8.2 , will this erase all my files,apps,etc ? and will i loose the licence of microsoft office 2011, how to make a backup on a pendrive ?  I have files of approx 180 gb , THANK YOU !!

    Forget the Pendrive stategy...
    Before attempting any Major Upgrade... get yourself an External Hard Drive... and create a Bootable Clone Backup of your current Hard Drive...
    By far the easiest way to make such a Backup, is to use something like
    SuperDuper  http://www.shirt-pocket.com/
    or CCC  http://www.bombich.com/
    That way, should anything untoward happen during the Upgrade,
    you will NOT LOSE ANYTHING.
    (Get an EHD that is at least equal to your current Drive...)
    Also, Check here for compatibility of 3rd party Software you may be using...
    http://roaringapps.com/apps:table
    You should also consider more RAM... Get the Maximum you can for your Mac...
    It is important to get the Correct and Matching RAM
    See Here  >  OWC RAM  >  http://www.macsales.com

  • I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    1-800-676-2775  apple support   tech support 1 800 275 2273
    If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
    click the apple----->click about this Mac ------> click on version----> until you see the serial number.  You may have to do this a couple of times if it freezes before you have all the numbers.  A camera might help.
    Good Luck

  • How to make Form builder 10g step into libraries *.pll while remote debug

    How to make Form builder 10g step into libraries *.pll while remote debug. It attaches fine and goes through code located in form but skips pll's. In this case I am interested in debuging CUSTOM.pll. How to step into pll's and is it possible at all?

    Is the library in the same directory or within your FORMS_PATH? Note that the runtime setting in the default.env doesn't work for the builder.
    cheers

  • How to make hot RMAN backup as consistent in 10g?

    Hi,
    While cloning database using rman hot backup it asking archivelog files. how to recover easily? How to make hot RMAN backup as consistent in 10g?
    Thanks,

    user2017273 wrote:
    Hi,
    While cloning database using rman hot backup it asking archivelog files. how to recover easily? How to make hot RMAN backup as consistent in 10g?
    Thanks,Take backup with "plus archivelog" command. This will require archived redo log files and automatically apply them

  • How to make the oracle forms 10g applet or runtime the size of 1024x768?

    Hi,
    Can anyone tell me
    How to make the oracle forms 10g applet or runtime the size of 1024x768?
    Thanks in advans..

    Please post your question in Forms Topic
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to make 1=1.00 in 10g?

    I have a query in 9i works well, but in 10g not work because dataa type mismatch:
    select ........... where A = B,
    data type A is number , B is number(10)
    how to make 1=1.00 in 10g?
    Thanks

    number's default is 10,2
    so how to make 1.00 =1 in 10g?As you can see from this following example, there's no problem from the information you have given...
    SQL> desc prove_case;
    Name                                                                     Null?    Type
    X                                                                                 NUMBER
    Y                                                                                 NUMBER(10,2)
    SQL> insert into prove_case values (1, 1.00);
    1 row created.
    SQL> select * from prove_case;
             X          Y
             1          1
    SQL> select * from prove_case where x = y;
             X          Y
             1          1
    SQL> insert into prove_case values (2.25, 2.25);
    1 row created.
    SQL> select * from prove_case;
             X          Y
             1          1
          2.25       2.25
    SQL>So unless you post all the information, you won't get an answer.

  • Hello guys! Do you know how to make a video smaller on imovie? Not by size or trim, i mean simply show the video as small as possible in the middle of the screen! Please text back.

    Hello guys! Do you know how to make a video smaller on imovie? Not by size or trim, i mean simply show the video as small as possible in the middle of the screen! Please text back.

    Go to the Map, Background & Animatic Browser (last button in the centre tool bar alongside the Transition button). Drag the Black background (or any background) to your project. From an Event, drag the video selection directly onto the Black clip in the project. As you drop the video clip, a pop-up menu will appear. Select Picture in Picture.
    Your video will appear as a small picture within the black clip. Click on it and reposition it to the centre of the viewer, using the yellow guide lines to get the exact centre position. Resize the Picture in Picture if desired by dragging the corner handles.
    NOTE: You may need to extend the duration of the Black clip to match the duration of the video clip. Double-click on the Black clip to open the Inspector, then adjust the duration there.
    John
    Message was edited by: John Cogdell - added NOTE

  • I wanna ask you something. My bro has an iPhone 5s that disabled for 23 million because of the time changed to 1976. So, how to make it back into 2015, make it enabled without erase the data

    I  wanna Ask you something. My brother has an iPhone 5s that disabled for about 23 millions minutes  the time changed to 1976. So how to make it back into 2015 without waiting for 23 millions minutes later and enabled it without erasing any data? Please answer me ASAP because I really need it. Thank you for answer!

    Hello theshadowhunters,
    There is not much you can do to change the time back because he will not have access to change the time. The only option to get passed this is to restore the iPhone. Once the iPhone is restored and have a back up, you can put that back on once the restore is complete. For more information, take a look at the article below. 
    Forgot passcode for your iPhone, iPad, or iPod touch, or your device is disabled
    https://support.apple.com/en-us/HT204306
    Regards,
    -Norm G.  

  • How to make a custom eraser tool using flash?

    I did make a eraser tool. But once I begin to erase a layer, the background layer is visible. I want the layer just below the topmost layer to be visible.
    For eg consider 2 layers.
    Layer2 is above Layer1.
    When I perform erase on Layer2, I see the stage background.
    I want to actually see Layer1 when I erase from Layer2.
    Here is the code I used:
    The comment entry shows that, I have tried that possiblity.
    import flash.display.BitmapData;
    var linkageId:String = "myimage";
    var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);
    trace(myBitmapData instanceof BitmapData);
    this.createEmptyMovieClip("mc",this.getNextHighestDepth());
    mc.attachBitmap(myBitmapData,this.getNextHighestDepth());
    this.blendMode = "layer";
    //mc.blendMode = "layer";
    this.createEmptyMovieClip("mc1",this.getNextHighestDepth());
    var myBitmapData1:BitmapData = new BitmapData(800,600, false, 0xFF000);
    mc1.attachBitmap(myBitmapData1,this.getNextHighestDepth());
    mc1.onMouseMove = function() {
    var circle_mc:MovieClip = this.createEmptyMovieClip("circle_mc", this.getNextHighestDepth());
    circle_mc._x = _xmouse-40;
    circle_mc._y = _ymouse-40;
    drawCircle(circle_mc,40,0x000000,50);
    //mc.blendMode = "layer";
    circle_mc.blendMode = "erase";
    function drawCircle(target_mc:MovieClip, radius:Number, fillColor:Number, fillAlpha:Number):Void {
    var x:Number = radius;
    var y:Number = radius;
    with (target_mc) {
    beginFill(fillColor,fillAlpha);
    moveTo(x+radius,y);
    curveTo(radius+x,Math.tan(Math.PI/8)*radius+y,Math.sin(Math.PI/4)*radius+x,Math.sin(Math.P I/4)*radius+y);
    curveTo(Math.tan(Math.PI/8)*radius+x,radius+y,x,radius+y);
    curveTo(-Math.tan(Math.PI/8)*radius+x,radius+y,-Math.sin(Math.PI/4)*radius+x,Math.sin(Math .PI/4)*radius+y);
    curveTo(-radius+x,Math.tan(Math.PI/8)*radius+y,-radius+x,y);
    curveTo(-radius+x,-Math.tan(Math.PI/8)*radius+y,-Math.sin(Math.PI/4)*radius+x,-Math.sin(Ma th.PI/4)*radius+y);
    curveTo(-Math.tan(Math.PI/8)*radius+x,-radius+y,x,-radius+y);
    curveTo(Math.tan(Math.PI/8)*radius+x,-radius+y,Math.sin(Math.PI/4)*radius+x,-Math.sin(Math .PI/4)*radius+y);
    curveTo(radius+x,-Math.tan(Math.PI/8)*radius+y,radius+x,y);
    endFill();

    use:
    import flash.display.BitmapData;
    var linkageId:String = "myimage";
    var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);
    trace(myBitmapData instanceof BitmapData);
    this.createEmptyMovieClip("mc",this.getNextHighestDepth());
    mc.attachBitmap(myBitmapData,this.getNextHighestDepth());
    this.createEmptyMovieClip("mc1",this.getNextHighestDepth());
    var myBitmapData1:BitmapData = new BitmapData(800,600, false, 0xFF000);
    mc1.attachBitmap(myBitmapData1,this.getNextHighestDepth());
    mc1.blendMode="layer"
    mc1.onMouseMove = function() {
    var circle_mc:MovieClip = this.createEmptyMovieClip("circle_mc", this.getNextHighestDepth());
    circle_mc._x = _xmouse-40;
    circle_mc._y = _ymouse-40;
    drawCircle(circle_mc,40,0x000000,50);
    //mc.blendMode = "layer";
    circle_mc.blendMode = "erase";
    function drawCircle(target_mc:MovieClip, radius:Number, fillColor:Number, fillAlpha:Number):Void {
    var x:Number = radius;
    var y:Number = radius;
    with (target_mc) {
    beginFill(fillColor,fillAlpha);
    moveTo(x+radius,y);
    curveTo(radius+x,Math.tan(Math.PI/8)*radius+y,Math.sin(Math.PI/4)*radi us+x,Math.sin(Math.PI/4)*radius+y);
    curveTo(Math.tan(Math.PI/8)*radius+x,radius+y,x,radius+y);
    curveTo(-Math.tan(Math.PI/8)*radius+x,radius+y,-Math.sin(Math.PI/4)*ra dius+x,Math.sin(Math.PI/4)*radius+y);
    curveTo(-radius+x,Math.tan(Math.PI/8)*radius+y,-radius+x,y);
    curveTo(-radius+x,-Math.tan(Math.PI/8)*radius+y,-Math.sin(Math.PI/4)*r adius+x,-Math.sin(Math.PI/4)*radius+y);
    curveTo(-Math.tan(Math.PI/8)*radius+x,-radius+y,x,-radius+y);
    curveTo(Math.tan(Math.PI/8)*radius+x,-radius+y,Math.sin(Math.PI/4)*rad ius+x,-Math.sin(Math.PI/4)*radius+y);
    curveTo(radius+x,-Math.tan(Math.PI/8)*radius+y,radius+x,y);
    endFill();

  • How to make a job run on a appointed node

    I have a problem. The database is Oracle 10g, RAC, two nodes
    There are some job which run on everyday night. Now, something happened, the job run on Node A can't work as normal, but if run on node B, It will work well.
    so I just want to submit the jobs on Node B, I submited the jobs on Node B, but the jobs always run on Node A.
    I want to know how to make a job run on a appointed node.

    the Job just transfer some procedure to add partitions for some table, to merge the records from some tables to one table and so on.
    the problem is when the job run on Node A, it is very very slow, the procedure would run hours and not success end, but if on Node B it will successfully end in seconds.
    restart the Node A would be a way for the problem, but may it will leave a hidden trouble. I want save the scene to find out the problem
    so can you help me

  • How do i properly erase an iphoto folder?

    unfortunately (and ironically), in my paranoia to not lose any photos, i've imported similar photos several times into iphoto. i then used iphoto diet, but it does strange things sometimes - in my experience, it doesn't always remove the proper duplicate (but the thumbnail), etc. so i've resorted to manually sorting each of 15K (ouch!) photos to remove the correct duplicate. i do this by sorting through the photos for different years. i've started working on 2004, and wanted to start with a clean slate and erase all the photos, then only import the orinigals i want, but iphoto 'residually' shows the saved thumbnails (i think they're thumbnails b/c they are only about 16kb, and don't open to full size - i get the 'white screen' that others have mentioned). i entered the iphoto folder (i know - a no no, but didn't know how else to erase 2004 photos) and deleted the 2004 folder.
    sorry for being so wordy - can you suggest a way to eliminate my 2004 photos in a way that would be iphoto-friendly ?
    thanks for any suggestions.
    -vince

    There are several ways to erase photos, slideshows and albuns from iPhoto.
    First of all, to make you more feel secure all you photos are actually in your iPhoto library- that means they have been copied to you pictures folder. Whatever you do with them, the originals are kept. I mean, if you have one photo in a certain album and if you erase it from that album, the original is kept in the Library and pictures folder. All iPhoto does is like an alias to the Library, so it is perfectly safe to erase an album or slideshow in iPhoto, since the real photos are in the Library, and the most real ones are still kept in the pictures folder on the finder.
    ..."how do i properly erase an iphoto folder?"- select it and press "delete" or on the "edit" menu--> "erase/delete/cut"... again... don't worry about the content of this folder/album, because they will remain either on the iPhoto Library and pictures folder on the Finder.
    Sorry to be so confusing...
    Hope I've been helpfull.
    Kisses from Portugal
    CV

  • How to make best videos/audios for Creative Zen/Zen Vision W/Zen Vision M/Z

    4Easysoft Creative Zen Video Converter is an all-in-one Video Converter for Creative Zen software with high output quality and powerful video editing functions, which can help all the zen users to make the best video/audio effect.
    First of all, let’s make clear what kinds of videos/audios can get the best effect in the zen players.
    Video:
    MPEG, WMV, and AVI (MPEG-4 SP, DivX, Xvid), while MPEG-1, and MPEG-2 are supported, but must be transcoded with the included software.
    Audio:
    MP3, AAC, WMA, WAV, and Audible 2, 3, and 4 formats.
    Settings:
    Video resolution: 320×240; Video Bitrate: 500 kbps; Audio Bitrate: between 96 to 128 kbps.
    Then, let me show you how to make a full use of this powerful converter.
    Preparation:Download and install 4Easysoft Creative Zen Video Converter
    http://www.4easysoft.com/guide/creative-zen-video-converter/main.jpg
    Step 1: Run this software and add video/audio files.
    Step 2: Select output video format from the profile drop-down list.
    Click the “Profile” button to select the output video format from the drop-down list button.
    Step 3: Customize output settings.
    Click “Settings” button in the output settings area, you are allowed to customize the output parameters, specify output folder and select output format.
    Step 4: Start conversion
    Click “Start” button on right bottom of the main interface, you can begin the conversion. All the tasks of conversion will be finished at fast speed and high output quality.
    http://www.4easysoft.com/guide/creative-zen-video-converter/steps.jpg
    Tips on editing videos:
    1: Capture your favorite picture.
    Just click the “Snapshot” button to save your favorite image.
    2: Merge videos into one file.
    Just check the “merge into one file” option if you want to merge the selected contents into one file As default the merged file is named after the first selected file (either a title or a chapter)
    3: Select preference
    Click the “Preference” button and a dialog pops up, you can select the output destination, the Snapshot foler, the format of the snapshot image. You can also choose to shut down your computer or do nothing after your conversion. You can also select the CPU usage.
    4: Trim video
    You can get any clip of your video and put it on your zen.
    5: Crop video
    You can crop your video by selecting your video mode, setting crop values, or drag the frame.
    http://www.4easysoft.com/guide/creative-zen-video-converter/tips.jpg
    Ok, just enjoy movies and music with your Creative Zen player now!
    More useful tools:
    MP4 Converter is a powerful MP4 Video Converter which is designed to convert almost any video formats to MPEG-4 standard formats; WMV Converter provides perfect solution to convert common video formats to WMV with the best quality of picture and sound; Apple TV Video Converter is the excellent Apple TV converter software to convert all video files such as AVI, MPEG, WMV, MP4, MOV, RM, ASF, 3GP, VOB, etc, to Apple TV movies.
    Edited by: user11254370 on 2009-6-9 下午11:58

    Just wanted to mention - I bought the IR Remote thinking to make the player useful without navigation keys. Now I feel like I wasted more money instead of shifting to some other player by some other company with better customer service.

Maybe you are looking for

  • Can i transfer music from my new computer to my ipod nano?

    I have been happily using my new ipod nano for some months. I have just bought a new computer. I downloaded itunes for the new computer and started to add some new cds. Now i am connecting my nano to the new computer for the first time and am trying

  • ALD VAT Sum Question

    I am a realy newbie regarding to the ALD in Business One. I am trying to print out at the end of my producttable in my invoice a line like this: "incl. VAT with Code A2 at 16,00% (for instance) of (the amount of all the lines which are calculated wit

  • How to safely remove version of firefox that uses the system default locale?

    I have Firefox with Greek locale due to my location. I want to use Firefox in English, so I downloaded the English version and installed (in another HDD). I've already set it as a default browser, and thus, clicking at the firefox quick launch icon o

  • Problems with abstract classes

    I'm reading Java Wireless Blueprints and i'm confused with the functionality of abstract classes, especially in the next section: public byte[] getPoster() throws ApplicationException { if (poster == null) { try { poster = ModelObjectLoader.getInstan

  • IPhoto version compatibility with Snow Leopard

    Since I can't transfer my individual picture dates nor my extensive album data to iPhoto 9, is it possible to install an earlier iPhoto version on my new iMac that will accept this data? Thanks, Barbara Westmoreland