to create a cursor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srikkanthms09
    New Member
    • Jan 2010
    • 1

    to create a cursor

    Hai

    Hai
    I need to generate a daily attandence report. My file is in text format so i need to create a cursor and generate these values dynamically in forms6i.

    I have create a browse button and from that it will fetch the data and i need to process the data in this format

    my data is in this format

    000000001234567 801012010085

    first 16 is barcode no
    second 8 is date
    third 4 is time

    and i need to generate multiple records.

    how is it possible.. pls tell the steps to do..

    Regards

    Srikkanth.M
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    use UTL_FILE for reading data from a file.

    Comment

    • Saii
      Recognized Expert New Member
      • Apr 2007
      • 145

      #3
      can you please explain your problem again, it is not clear whether you want to generate a report or a stored procedure writing to file or display the records using forms?

      Comment

      • Madhusmita Biswal
        New Member
        • Feb 2010
        • 6

        #4
        Use UTL_File and follow the steps

        Follow the steps

        1) First try to create a directory and in the directory create a file with txt and keep all ur data 000000001234567 801012010085
        2) These directory is basically for using UTL_FILE concept.
        3) Use UTL_FILE.fopen and UTL_FILE.get_li ne
        4) After you get the data 000000001234567 801012010085 use substr to get first 16 as barcode ,2nd 8 as date and last as time.
        5) Try to loop all these and use plsql table to get the array of data.
        6) Try to insert it to a table in three different column and then u can generate the report from that temp table.

        Hope you can understand the step.

        Comment

        • OraMaster
          New Member
          • Aug 2009
          • 135

          #5
          You need to keep your data file on server machine and make sure that you have read/write access on the directory/file full path. After this you need to create reference for that physical directory path.

          Best of Lucks

          Comment

          Working...