How to write the new records not with existing records.

hi,
I have a script.If i execute the script it writes the records.but its writing with the exisiting records.It writes not only the new records but also the old records.
for eg: the exisiting records are:
1111115-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111116-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111117-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111118-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111119-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
but now what happend is the new records such as
1111116-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111117-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111118-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111119-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
it gets appended with the old existing records,
1111117-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111118-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111119-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111113-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111114-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111115-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111116-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111117-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111118-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
1111119-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
there will be some problem happens when we are going to upload a bulk data of say 25000 records.if its gonna update 20000 records,rest 5000 records i have to do it in next step,if this is going to happen then the first 20000 records will be displayed forever.because it have the capacity to write 20000 records.thenext 500 records will not be written.so there is a chance of redundancy.how to avoid this redundancy while running this script
my script is
create or replace procedure input_tables(table1 in varchar2)
is
str varchar2(32767);
cnt number(2);
cursor c1(tname in varchar2)
is
select column_name
from all_tab_columns
where table_name = tname
order by column_id;
rec c1%rowtype;
begin
cnt:= 1;
str:= 'declare '||
'cursor c2 '||
'is '||
'select ';
open c1(table1);
loop
fetch c1 into rec;
exit when c1%notfound;
if cnt = 1 then -- Added New
str:= str||rec.column_name; -- Added New
cnt:= cnt + 1; -- Added New
else -- Added New
str:= str||'||'',''||'||rec.column_name; -- Added New
end if; -- Added New
end loop;
close c1;
str:= str||' SRC from '||table1||';'||
' r2 c2%rowtype;'||
' ft UTL_FILE.file_type;'||
' str2 varchar2(200);'|| --Added New
' begin '||
' ft := UTL_FILE.fopen(''SAMPLE'',''OUTPUT.csv'',''w'');'||
' for r2 in c2'||
' loop '||
' UTL_FILE.put_line(ft,r2.SRC);'||
' end loop;'||
' UTL_FILE.fclose(ft);'||
' end;';
execute immediate(str);
end;
thanks,
Ratheesh.

Hi!
U can check the following script --
create or replace procedure input_tables(table1 in varchar2,start_col in number,last_col in number)
is
     str varchar2(32767);
     cnt number(2);
     cursor c1(tname in varchar2)
     is
       select column_name
       from all_tab_columns
       where table_name = tname
       order by column_id;
     rec c1%rowtype;
begin
     cnt:= 1;
     str:= 'declare '||
     'cursor c2 '||
     'is '||
     'select ';
     open c1(table1);
     loop
          fetch c1 into rec;
          exit when c1%notfound;
               if cnt = 1 then -- Added New
                    str:= str||rec.column_name; -- Added New
                    cnt:= cnt + 1; -- Added New
               else -- Added New
                    str:= str||'||'',''||'||rec.column_name; -- Added New
               end if; -- Added New
     end loop;
     close c1;
     str:= str||' SRC from '||table1||
     ' where rownum between '||start_col||' and '||last_col||';'|| -- Added New
     ' r2 c2%rowtype;'||
     ' ft UTL_FILE.file_type;'||
     ' str2 varchar2(200);'|| --Added New
     ' begin '||
     ' ft := UTL_FILE.fopen(''SAMPLE'',''OUTPUT.csv'',''w'');'||
     ' for r2 in c2'||
     ' loop '||
     ' UTL_FILE.put_line(ft,r2.SRC);'||
     ' end loop;'||
     ' UTL_FILE.fclose(ft);'||
     ' end;';
     execute immediate(str);
end;
/ To print first ten rows --
exec input_tables('EMP',1,10);  --first 10 rowsTo print next remain rows --
exec input_tables('EMP',11,15);N.B: No tested....
Regrads.
Satyaki De.

Similar Messages

  • How to add the new dep area in existing cod

    Dear all,
    how to add the new dep area in existing cod we are planing to implement the IFRS by using leading ledger and non leading ledger present we are using OL leading ledger
    present we are using dep area 01 ,15
    how to achive the parallel accounting in asset accounting how to add new dep area 30 in existing COD
    if any document plz refer me  

    Hi Bhayyapu,
    Please refer to the links given below.
    New Depreciation area
    Adding a New Depreciation Area to Existing Assets - Financial Accounting (FI) - SAP Library
    Hope this will help you.
    Regards
    Eugene

  • How to use the new MacBook 13'' with Built-in 7-hour battery

    Hi,
    I just bought the new MacBook, it is my first Mac, and having the Built-in 7-hour battery I don't know if I can plug it in most of the times without doing any damage to the battery.
    On other portable computers, I just take the battery out and than plug it in and use it, but in this one that can not be done.
    So, what to do? Try to always drain and recharge fully, or it is no problem to plug it in when the battery is fully charged?
    I read that you should let it sleep(when it goes to sleep because it doesn't have battery)for 5 hours before charging it so it really drains. Is that really necessary?
    Also after it goes to sleep and I plug it in to charge, should I let it charge in Sleep Mode, or should I Shut it down and let it charge?
    What has been your experience with battery life? The first time I used it, it lasted for 4hours, is this normal and it will get better with 3 or 4 fully charges/draines?
    Thank you very much for your help.
    Pantuf

    Hey guys, I understand your concern that you're not getting 7 hours out of your battery but let me put a couple things into perspective and also offer you some info from Apple's website that may or may not explain why you aren't getting the full 7 hrs.
    First mgb545, 5.5 hours is killer for laptop battery, but nonetheless you paid for it for the 7 hour battery so I don't fault you in any way for wanting what they said you would get.
    Second, the MacBook is Apple's "sub $1000" notebook. At first mention of that you think, "alright, it's under a thousand bucks!". It is, it's just $999...
    My point is that it's an advertising game. The MacBook can get +up to+ 7 hours on a single charge but not everybody is doing the same things or has the same configuration as when Apple was testing their machines. You might have a Time Machine HDD backing up (which I don't recommend nor do I think you guys do since you didn't mention it) or some other USB peripheral that takes power which would lower the battery's life. However, I think there is
    This is straight an easier explanation... This next blurb is the "fine print" from Apple's website right on their MacBook page about how they got 7 hrs.
    +"Testing conducted by Apple in October 2009 using preproduction 2.26GHz Intel Core 2 Duo-based MacBook units. Battery life depends on configuration and use. See www.apple.com/batteries for more information. The wireless productivity test measures battery life by wirelessly browsing various websites and editing text in a word processing document with display brightness set to 50%."+
    That all being said, I think or at least hope you'll find your answer there. For starters, it says "various websites". Who knows if those were basic HTML or Flash heavy sites or a combination of both? The other stipulation of this is brightness. Do you guys have your brightness at 50% or is it higher?
    Try this, I know the weekend just passed, but if you find that you have 7 hours where you don't need your laptop, leave it on, make sure it doesn't go to sleep or screen saver, play with it every so often, leave wi-fi on, make sure your brightness is at 50% and then see how long it lasts.
    One last thing, when you say you're getting 5.5 hrs out of your battery, how low are you letting it go to? I'm assuming when Apple says "a single charge" they mean it. So if you're getting 5.5hrs when it goes down to 8 or 10% you also need to factor in the extra time you might gain from that.
    Hope this help, let me know how your computers are set up, I'm curious to know if this will resolve or at least account for your lack of 7 hrs because me just recently got the 13" MBP and it doesn't get 7hrs either.
    -David

  • How well do the new earpods work with small ears?

    My wife has a hard time with earbuds because she has small ears. Just curious if the new earpods would work better for her or not. Anybody have experiance with these yet to know?

    I just got a macbook and it works fine with my dell 2007fpw. For that matter, my g3 ibook works fine (if a little slow for some operations) with that monitor at full resolution (1600x1050) (after screenspanning doctor). The graphics card may be weak compared to other current laptop offerings, but it is by no means bad, and for any 2d task it is just fine.
    ibook g3/macbook white 2ghz   Mac OS X (10.4.7)  

  • How to get the New created Hier for existing IO and IS in the Infopackage

    hello Gurus,
    I have created a new Custom hierarchy on an existing InfoObject 0Costcenter. There are many Hierarchies already existing and being fed from R3. This new hierarchy is just a regrouping of costcenters.
    Now I have created this new Hier and activated it, When I tried to create a Infopackage to load this new Hier, I am not finding the new created Hierarchy in the Hierarchy Selection tab of Infopakage.What should I do to see this new HIer.
    Thanks
    Simmi

    so, the costcenter hierarchy created by the user is not a std costcenter hierarchy, so it should be a set hierarchy. go to tcode BW07 in r/3, give the name of the table and field, if you like the name of the datasource too orelse the system woudl generate it. But the costcenter hierarchy is compounded to controlling area, you would need to write a user exit to populate the compounding object too in the datasource, orelse all the costcenters would be unassigned to controlling area. once created, you can check the same in rsa6. once you see it there, replicate the DS to BI, and after that the data flow is same. create a new infopack to load the set hierarchy, as you wont be able to see this hierarchy in the std costcenter hierarchies.
    check a few other threads:
    Tcodes BW10/BW07 - how to use these
    compounding for hierarchies:
    ZXRSAU04 - programming for compounding in hierarchy

  • How to install the new JSF product over existing?

    I would like to download the trial product of jsf & struts, but I currently own the struts product.
    How do I install the trial product and not mess up my current strut projects?
    thx

    Hi,
    Download & install the NitroX for Struts-JSF product in a separate folder other than your struts installation.
    And then launch NitroX (Start > M7 NitroX > NitroX 2.1), this will give you a separate Struts-JSF trial license valid for 15 days.
    Thanks
    M7 Support

  • Have iTunes version 10 .3 but do not understand cloud in iTunes 11.03 can someone explain it and also how do you find duplicates in new version and will the new version sync with my iPod Classic which I have had for 4 years

    I have iTunes version 10.03 which I love but my iPad Apple mini has iOS 7 but I don't understand the new iTunes what is the cloud shown next to the music and how can I find duplicates can anyone help me navigate the new iTunes and will the new version sync with my iPod Classic which is 4 years old

    The main differences between iTunes 11 and earlier versions are the loss of coverflow and ability to have multiple windows open.
    In Windows, you can restore much of the look & feel of iTunes 10.7 with these shortcuts:
    ALT to temporarily display the menu bar
    CTRL+B to show or hide the menu bar
    CTRL+S to show or hide the sidebar
    CTRL+/ to show or hide the status bar (won't hide for me on Win XP)
    Click the magnifying glass top right and untick Search Entire Library to restore the old search behaviour
    Use View > Hide <Media Kind> in the cloud or Edit > Preferences > Store and untick Show iTunes in the cloud purchases to hide the cloud items. The second method eliminates the cloud status column (and may let iTunes start up more quickly)
    If you don't like having different coloured background & text in the Album (Grid) view use Edit > Preferences > General and untick Use custom colours for open albums, movies, etc.
    With iTunes 11.0.3 and later you can enable artwork in the Songs view from View > Show View Options (CTRL+J) making it more like the old Album List view
    View > Show View Options (CTRL+J) also contains options to change the sorting of grid based views
    The cloud icons give you access to stream or download any qualifying past purchases that you don't currently have downloaded to the library.
    Regarding duplicates, things haven't really changed. Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin. Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    Yes, iTunes 11 will support your iPod classic.
    tt2

  • HT1208 Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.

    Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.

    Use it the same way as previously.
    ctrl B shows the menus.
    ctrl S shows the sidebar.
    What else do you need help with?

  • How can I convert string to the record store with multiple records in it?

    Hi Everyone,
    How can I convert the string to the record store, with multiple records? I mean I have a string like as below:
    "SecA: [Y,Y,Y,N][good,good,bad,bad] SecB: [Y,Y,N][good,good,cant say] SecC: [Y,N][true,false]"
    now I want to create a record store with three records in it for each i.e. SecA, SecB, SecC. So that I can retrieve them easily using enumerateRecord.
    Please guide me and give me some links or suggestions to achieve the above thing.
    Best Regards

    Hi,
    I'd not use multiple records for this case. Managing more records needs more and redundant effort.
    Just use single record. Create ByteArrayOutputStream->DataOutputStream and put multiple strings via writeUTF() (plus any other data like number of records at the beginning...), then save the byte array to the record...
    It's easier, it's faster (runtime), it's better manageable...
    Rada

  • HT1752 I recently purchased an old iMac G3 Macintosh. I was wondering, is there a way where I can update it without using an external disc? I've seen the newer Apple products with the dock, if I update my iMac G3, will it have that, and if so, how can I d

    I recently purchased an old iMac G3 Macintosh. I was wondering, is there a way where I can update it without using an external disc? I've seen the newer Apple products with the dock, if I update my iMac G3, will it have that, and if so, how can I do that?

    I was wondering, is there a way where I can update it without using an external disc?
    If you mean the iMac does not have an internal optical drive capable of reading DVDs, the only option requires another Mac with a DVD-capable drive and FireWire ports. Your iMac G3 will also require FireWire ports. Not all G3 iMacs have Firewire. FW started with the Summer 2000 models with 400mHz and faster processors.
    With FireWire, you can use FireWire Target Disk mode to install from a retail OS install DVD in another Mac. If you supplemental info info tells us if you have another Mac with a DVD reader and the FW ports, we can walk you through the process.
    If the iMac has a tray-loading drive, I'd forget it. They are very limited not only in the OS max (10.3.9) but also in RAM capability. Starting with the slot-loading iMac G3s, the max RAM increased to 1 GB (2 X 512MB modlules). Tiger likes 1GB RAM.
    Understand that pre-Intel Macs are getting harder to use. Even with 10.4.11, your choice of browsers is limited (TenFourFox is the most viable option) and the G3s  rudimentary video hardware means web browsing will be choppy at best.
    If you are in the USA, you can try calling the Apple Store (1-800-MY-APPLE) for an OS disk. As recently as Jan 20, someone posted here that they were able to buy Tiger by calling. It was not clear whether the disks were replacement system install/restore disks or full retail install, but it's a free call.
    When you do "About this Mac" to check teh OS verion, also look at the processor speed and tell us what that says. That can help with recommendations for an upgrade path.

  • How to show the new table record after creating

    I have a table form. After creating a new record to the table, the page go back to the same page. I wanta know how to show the new record after click 'Create' button. Right now, all the items will be cleared.
    Thanks.

    The button submits the page so just create a branch that directs to a new page (which you'll have to create if you have not already done so) after submission which directs to a new page and uses the newly generate PK to display the row you've generated. You'll need to make the branch conditional on that press of the Create button.
    Phil

  • How can I tell the differences between the new MacBook Pro with retina display and the old MacBook Pro with retina display by looking

    I'm just wondering the differences between the new MacBook Pro with retina display which was just released in October 2013 and the old MacBook Pro with retina display.

    Thank you for the reply! As you said they looked exactly the same, so I'm not able to tell the differences just by looking, right? I'm thinking to buy a new 13-inch MacBook Pro with retina display, but I'm not buying the MacBook in Apple Store, I'm buying it in other shops, how can know whether they are not selling me the old model of MacBook Pro with retina display?

  • How does one sync the new time capsule with the old airport extreme and airport express in order to extend range?

    How does one sync the new time capsule with the old airport extreme and airport express in order to extend range?

    Thanks for the additional information.
    Unfortunately, the AirPort Utility application in the Lion and Mountain Lion operating systems, which is used to configure the new Time Capsule does not support the older versions of the products that you have.
    Even if it did, there are no settings on the older AirPorts to "Extend a wireless network", so they are not compatible with the new Time Capsule if you intend to extend the network only using wireless connections.
    If you have the ability to connect each AirPort to the Time Capsule using a permanent wired Ethernet cable connection, it might be possible to use a complicated workaround to install an older version of AirPort Utility to configure the older AirPorts to work with the new Time Capsule.
    If you have another Mac there that is using the Leopard or Snow Leoapard operating system, things would likely be simpler. I have not done this type of procedure to mix a new Time Capsule with older AirPorts, so I would not be able to say whether this would work or not.

  • Do any one know how much it is to get the new ipod touch with the camera if you trade in your old ipod touch?

    do any one know how much it is to get the new ipod touch with the camera if you trade in your old ipod touch?

    Sounds like you need a new battery.  I would make an appointment at the Genius Bar of an Apple store to confirm.  Apple will replace the battery for $79.  A third-party place like the folloing may be less expensive.  Google for more places.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    You can also replace it yourself if you are so inclined.  For parts and instruction:
    iFixit: The free repair manual

  • HT201304 Visa has changed for the purchase of Apple products, i did not know how I put the new MasterCard number to finish the process of buying products Thank you

    Visa has changed for the purchase of Apple products, i did not know how I put the new MasterCard number to finish the process of buying products Thank you
    i have ibad mini
    and iphone4
    laptop sony
    can you sent for me the anser

    Changing Account Information  >  http://support.apple.com/kb/HT1918

Maybe you are looking for