How to add a character using UTL_FILE pkg

A table with student_id, student_name and date_of_join.
create table student(std_id varchar2(10),std_name varchar2(20),std_doj date);
I'm loading data from flat file below using UTL_FILE package
101   ron   04081999
101   ron   01081996
102   ram   05082000
102   ram   12101999
103   fin   06082001
104   gin   07082002
105   gem   08082003
I use a procedure to load the data into the table using the UTL_FILE package

Student ID 101 & 102 have two dates mating as they registered for two courses. In the flat file, there is no change in the std_id, but I have to add a 'C' character to those who have registered for the second course.

I have to add a character in column std_id. for example: after loading the result I want is
std_id          std_name          std_doj
--------------------------------------------------------------
101          ron               04081999
101C          ron               01081996
102          ram               05082000
102C          ram               12101999
103            fin                06082001
104             gin               07082002
105             gem               08082003          
Can you please give me an idea on how to get the result above using UTL_PACKAGE in the procedure?

It has nothing to do with UTL_FILE. In your charge process you are a loop in the file line by line, right? IF you need to:

DECLARE
    prev_std_id number;
BEGIN
    LOOP
      read a line
      parse it into std_id, std_name and std_doj
      IF std_id = prev_std_id
        THEN
          std_id := std_id  || 'C';
        ELSE
          prev_std_id := std_id;
      END IF;
      insert row
    END LOOP;
END;

SY.

Tags: Database

Similar Questions

  • How to add TITLES staged using Windows DVD Maker?

    There are many instructions on how to burn a DVD. The problem is my scenes appear with no title and I want to add a little. What are the specific steps to take to achieve this? Or is it simply not possible in this program?

    John, thank you for your 3 links above. Unfortunately, they are essentially the same, but worse yet, none of them address in any way, how to add titles to the scene. Yes, there are instructions on how to rename the BUTTON SCENES, but it's not what interests me in practice. I want to quote the SCENES themselves that appear when I click the scenes button.

    Is it still possible? (My guess is that it is not.) It's very frustrating, because it is a fairly basic need.

    I burned three videos on one DVD - each with very subtle differences.  Now each of them appears in the area of scenes from the DVD as a kind of "film reel icon" with no title/label associated with each, so they look identical, leaving me to guess who is who. Let me label them so that I don't have to click on each one and shows him through know exactly that one I selected in the menu scenes.

    ==========================================
    Sorry for wasting your time.

    It might be worth a try to publish (save) each video clip as a
    video file .wmv separate in Movie Maker... each with she is has a unique
    ... the name of file, then import the saved clips collection in
    Creation of DVD.

    And... the following freeware might be worth a try:

    (FWIW) It's always a good idea to create a system
    Restore point before installing software or updates)

    DVD Flick
    http://www.dvdflick.NET/

    Be sure to read the Guide:
    http://www.dvdflick.NET/Guide.php

    If you have problems to download DVD Flick...
    Try the following direct link:
    http://tinyurl.com/yzx9sck
    or...
    http://downloads.sourceforge.NET/project/dvdflick/dvdflick/DVD%20Flick%201.3.0.7/dvdflick_setup_1.3.0.7.exe?use_mirror=SoftLayer

    Save the file to a folder on your hard drive and
    install from there.

    Tutorials:

    Tutorial DVD Flick
    http://beginwithsoftware.com/videoguides/DVD-flick-Guide.html

    Burn any Format video DVD PC
    http://www.freevideoworkshop.com/dvdflicktutorial.htm

    To create a video DVD base that should play in a free
    permanent drive DVD... try the following...

    First... read the DVD Flick Guide to familiarize
    with the program.

    Open DVD Flick and insert a blank DVD in your drive.

    If the window of Autorun from your computer... just close it.

    Click the project settings button and check... Video /.
    Target format... residents United States... Choose... NTSC /.
    Accept.

    The title button left click Add and navigate to your
    Video clips and select the ones you want on the DVD.

    You can have by selecting one and then use
    the up and down buttons.

    Left click on the button create DVD / OK / Yes / Yes.

    Please wait while the DVD is created.

    When the text "Completed successfully" is displayed you
    DVD Flick can close. Now you can eject your DVD
    and play in your DVD player.

    At some point you might want to buy more
    Advanced Cyberlink, Nero, Roxio, software
    Ulead, etc... but at least it is a start.

    Good luck.

    John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • How to add a character style in the active document

    Hi experts

    How to create a character style in the active document.

    How to make the script work.

    Thank you

    Respect of

    John

    var myCharacterStyle;

    myDocument var = app.activeDocument;

    var myCharacterStyle = myDocument.characterStyles.add({name:"c"});)

    myCharacterStyle.strikeThru = true;

    myCharacterStyle.strokeColor = 'Black ';

    myCharacterStyle.add)

    There is not much to say about your code. Only the last line would cause a problem. A possible hiccup is also on the fact that the style may already exist when you want to add.

    myDocument var = app.activeDocument;

    var myCharacterStyle = myDocument.characterStyles.item ('c');

    ! myCharacterStyle.isValid & myCharacterStyle = myDocument.characterStyles.add({name:"c"});)

    myCharacterStyle.strikeThru = true;

    myCharacterStyle.strokeColor = 'Black ';

  • How to add a character all the records in a field?

    Hi all

    I have a field called Item_Code which is the Varchar field. I need to add a prefix zero "0" to all the values in the field. So, for example, if I have a code SN001 article, I want to be 0SN001. I have about 50 or if the GTIN codes in this area that I want to change. How to change each of them with the set of update command? Thank you

    Have you tried:

    Update your_table

    Set item_code = '0'. item_code;

  • How to add the zero using the toString() function?

    Hello

    I looked in the manual and I can't find any reference to toString() for syntax information.  Is there a setting to use me to specify the length of the string?  And to add zeros or not?

    Here is the code that I need to add zeros:

    p laybutt.addEventListener (MouseEvent.CLICK, playSound);

    function playSound(e:Event)
    {
    SoundMixer.stopAll ();
    var num:Number = Math.ceil (Math.random () * 43);
    bigNum.text = num.toString ();
    var path: String = "Track number" + bigNum.text + ".mp3".
    trace (Path);
    var s:Sound = new Sound (new URLRequest (path));
    s.Play ();
    }

    The I am trying to open the files begins to "Track No01.

    Any ideas?

    Ron

    Try using:

    bigNum.text = num< 10="" "0"+string(num)="" :="">

    instead of bigNum.text = num.toString ();

  • How to add column after select *, ABC

    Dear friends,

    I create report with SQL query
    select * from CRM_ISSUE_PROBLEM IP where IS_ACTIVE ='Y'
    I want to add BILLNO column below after Select * look like select *, nvl ((select count (case_id) of CRM_ISSUE_PROBLEM_DETAIL AD
    (where IP.case_id = AD.case_id GROUP BY case_id), 0) AS BILLNO
    CRM_ISSUE_PROBLEM IP where IS_ACTIVE = 'Y '.

    nvl((select count(case_id) from CRM_ISSUE_PROBLEM_DETAIL AD 
    where IP.case_id=AD.case_id GROUP BY case_id),0) AS BILLNO 
    How to add column with using Select * SQL query.


    How can I do this?

    Thank you

    Hello

    select IP.*, new_column
    ....
    from TABLE IP
    
  • How to add the data in asm file

    Hello


    Can someone let me know how to add the data using ASM file

    DB-ORACLE 10.2
    OS RHEL

    create tablespace tbl_name
    DATAFILE '+ DATA' SIZE 1 G REUSE
    autoextend on next maxsize of 250 M 2 G;

    where is your asm disk group + DATA

  • Download the data using UTL_FILE

    Hi all

    I want to load data into the table of flat file and do not want to use SQL Loader. Can any body explain to me how this could be done using UTL_FILE. And something important I want to not all the columns in the file, I need specific columns.

    Is it possible to bulk operation for downloading data such that it will be faster compared to line-by-line reading and the same insertion If yes how?


    Thanks in advance...



    Kind regards
    Dhabas

    So they pay a lot of money for features of the Oracle DBMS only to code them again on their own? Weird, but are not uncommon.

    If they don't want to use SQL Loader, you might be lucky to ask them if they want to use external tables. As with utl_file, you read access on the server but simply set the table once and then you can do a select on it.

    How to create http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#i1007424

    If you have different file names you can change the definition accordingly Re: question of external table -

    What you try to do with utl_file will mutliply your efforts.
    -Open the file
    -loop
    -Read the line
    -cut out the delimiter string and assign each value to a variable
    -end of loop
    -close file

    Instead of
    -bulk collect in the external table collection

    Concerning
    Marcus

  • How to add a logo of company on the shirt of a character?

    The program of love and export my work to the PS... but how can I add a logo to the shirt of characters... This is my first foray into the 3d world so be gentle... Thank you

    Welcome to 3D!  It is a pleasure and an exciting place.  It is easy enough to do something like a logo.  Since you are new, brief explanation!  The models have so-called textures that tell them what color and other properties, they should have.  Fuse your character comes with several models and textures already made to fuse and brought back to Photoshop.  When you add the character to your canvas, you will notice the layers has a panel arrow that you can expand to view all textures associated with this model.  The diffuse textures are what manages the colors.

    • Add your character to the canvas
    • Expand the 3D layer to see textures that are associated with
    • Find the file called _Top_Diffuse under the section disseminates.  Double click it to open the texture.
    • You should see an area colored with essentially a 'model' for clothing.  (If you don't see the default template you can turn it on by going to the view menu by selecting > Show > UV Overlay.)  The UV model will help you understand what parts of the texture affect the 3D model.
    • The texture is a full PSD file so that you can put in your logo as a new layer, apply adjustment and paint filters.
    • When you are finished, you can save the .psd and your other tab (the character) will be updated!
    • You can also paint 3D directly on the model using a paintbrush in 3D mode.

    I recommend you to Watch this video tutorial that explains how to do all the work of texture and painting 3d if you get lost!

  • How can I add characters often used to my home keyboard? iPhone 5 - 9.3

    How can I add characters often used to my home keyboard? iPhone 5 - 9.3

    You cannot change the built in keyboards. There may be some third-party keyboards that will allow that. You should look for the App Store.

    What kind of characters are you talking about?

  • How to add all the tabs open as I used to?

    How to add all the tabs open as I used to?

    You can go to bookmark all tabs by right-clicking a tab, or use the hotkey Ctrl + Shift + D

  • I don't know how to add additional devices to my list of "trusted devices" in my Apple account.  When I opened my account on Apple using my apple id, I see only my iphone6 listed as a "trusted device";  There is a button to edit, for example. Delete the d

    I don't know how to add additional devices to my list of "trusted devices" in my Apple account.  When I opened my account on Apple using my apple id, I see only my iphone6 listed as a "trusted device";  There is a button to edit, for example. deleting devices, but I can't, or I do not understand how to add my other devices to my approved devices - but is anyone know how to add my Mac and iPad to this list?

    Download a purchase on a device should associate this device with your Apple ID take a look at this.

    View and delete devices in iTunes - Apple Support

  • I use the full version of DASYLab 8.0, how to add PID module in the design of the façade (window layout)? while I can vary the p, i, d values in the window layout

    I use the full version of DASYLab 8.0, how to add PID module in the design of the façade (window layout)? while I can vary the p, i, d values in the window layout

    To do that you will need to change the varibles PID values and then use the sliders to add numbers to a latch for variables that point.

    This is how I think it works in Version 8.

    In all cases, you should move on to 12 more stable summer.

    In addition, unless that is a very slow process, I generally do not like closed loop PID with DASYLab due to the fact that computers is not reliable with timing.

  • How to add programs to the start of the file using Vista

    How to add programs to the start of the file using Vista

    Hi Harry,.

    Oddly enough, you can actually do it in msconfig except if it is already there and simply not checked as opposed to not being do not at all (although you would think that they would understand this option).

    The easiest way is to add the program (or a shortcut to the program) in the folder all Menu Programs Startup.   Here is the procedure: http://www.ehow.com/how_5098465_add-startup-programs.html.  Remember, to do this, you must either a shortcut existing (perhaps on the desktop or elsewhere in the menu all programs) or you need to find the source file (probably somewhere in C:\Program Files depending on what you want to add) and either copy it and add it to the startup folder or right-click on it and create a shortcut to copy into the startup folder.  Once you reboot, this program starts during the initial commissioning process and you will now be able to control using msconfig.exe, if you wish.

    Another option is to do this by using the registry editor.  If you decide to try this, first create a restore AND system restoration point backup of the registry before you begin.  Here is the procedure: http://www.ehow.com/how_7304438_add-program-msconfig-regedit.html.  I recommend to use this ONLY if the previous procedure does not work for some reason any as long as that the procedure is simpler and safer.

    If you want a simpler way to manage and control startup programs, you can try it free WinPatrol http://www.winpatrol.com/download.html that change monitors for startup programs if you set it to run in real-time so that you know when to try new programs are added to your Start menu and, for the purposes of this question includes an Add button which opens a link to a window of Windows Explorer where you can browse the program you want to add, click open to select and then add it directly to the commissioning.  If you prefer it does not work all the time, you can simply uncheck the box which includes this program and it will work only when you choose to run (but at the start, will work as an indication otherwise or configured).  It will appear not in the start menu in all programs (Finally, WinPatrol is, but not programs, it adds to the start), but it will appear in WinPatrol (which also lets you manage what you want or not start with checkboxes as in msconfig) and sure in msconfig - but only after a reboot is complete the process of adding.

    I hope this helps.  Personally, I use WinPatrol myself and let it run in real time.  Since I do a lot of installations, it helped me often prevent the addition of a startup item I haven't really need and reduces how many times I actually need to check what is happening out there.

    If this answers your question without the need to repost in another forum, please mark it as an answer.  If this isn't the case, then of course you must republish as suggested above.

    Good luck!

  • How to add lyrics and album art using windows media player 12 on Windows 7?

    When I am running windows xp with WMP 11, adding lyrics, album art, and even synchronized lyrics is so easy, simply right-click on the song and select advanced tag editor.

    The Advanced Tag Editor (ID3 tag editor), which allows users to edit information, is Aussie an important feature, but I do not understand why Microsoft has actually remove this function.

    If I may ask, how to add the lyrics and album art in WMP 12. Find the album in WMP12 info function is really not that useful.  Japanese, Korean and Chinese songs when using find album info, generally, nothing is found.
    WMP12 is really irritating.

    It's because you can't do it within the WMP12. You have to do a right click on the file from windows Explorer, made > properties > summary > advanced > then you can add the words within the field of words... you see it's really a stirring :(

    See you soon
    Black spider

Maybe you are looking for

  • Music Apple 1 year for $99 with the gift card

    I was a member since they started now give a discount if you purchase a gift card and register. I want the same discount, I'd gladly pay a year in advance for a similar discount. Who's coming for members? Come on give Apple your loyal customers the s

  • What version of the PCI Express x 16, it's my motherboard has

    I am running: Pavilion - p6320y -AMD Phenom II X 4 820 -8 GB RAM -SATA HARD DRIVE 1 TB (7200 RPM) -Motherboard model: Violet6-GL8E Question: What version of the PCI Express x 16 is the slot on this motherboard: 1.x, 2.0 or 2.1? Can't get this informa

  • Difficulty to install Windows XP because of the missing HARD drive driver

    Hello I recently bought a P200-1 and I try to install Windows XP instead of Vista.I bought Windows XP Home Edition. Installation was first arrested for lack of HARD disk drive.Classic message: «Setup didn't find any hard drives installed in your comp

  • clsernat.dll x 64?

    I'm having a problem where myself and many camera makers are unable to communicate through camera link using 64-bit. NOR is expected on a 64-bit version of clsernat.dll?  It seems that it is not possible to develop a native 64-bit application without

  • Validation in XP pro on a computer problem compaq presario v2000 laptop

    I'm working on a computer at home laptop (compaq presario v2000). I'm trying to reinstall windows XP Pro with SP3. I was able to activate windows through the appropriate activation method. I use a key for XP pro on a dead computer I have and the tran