How to use GUI_upload for Uploading a CSV file in Microsoft Excel.

Hi Guys,
              can anybody tell me how to Upload the CSV format file in Microsoft excel sheet?
Thanks,
Gopi.

Hi Gopi,
u can use GUI_UPLOAD, TEXT_CONVERT_XLS_TO_SAP.
Please check these codes.
Uploading data from CSV file format into internal table using GUI_UPLOAD
REPORT zupload MESSAGE-ID bd.
DATA: w_tab TYPE ZTEST.
DATA: i_tab TYPE STANDARD TABLE OF ZTEST.
DATA: v_subrc(2),
v_recswritten(6).
PARAMETERS: p_file(80)
DEFAULT 'C:\Temp\ZTEST.TXT'.
DATA: filename TYPE string,
w_ans(1) TYPE c.
filename = p_file.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Upload Confirmation'
* DIAGNOSE_OBJECT = ' '
text_question = p_file
text_button_1 = 'Yes'(001)
* ICON_BUTTON_1 = ' '
text_button_2 = 'No'(002)
* ICON_BUTTON_2 = ' '
default_button = '2'
* DISPLAY_CANCEL_BUTTON = 'X'
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
* IV_QUICKINFO_BUTTON_1 = ' '
* IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
answer = w_ans
* TABLES
* PARAMETER =
* EXCEPTIONS
* TEXT_NOT_FOUND = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CHECK w_ans = 1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = filename
* FILETYPE = 'ASC
has_field_separator = 'X'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = i_tab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
* SYST FIELDS ARE NOT SET BY THIS FUNCTION SO DISPLAY THE ERROR CODE *
IF sy-subrc <> 0.
v_subrc = sy-subrc.
MESSAGE e899 WITH 'File Open Error' v_subrc.
ENDIF.
INSERT ZTEST FROM TABLE i_tab.
COMMIT WORK AND WAIT.
MESSAGE i899 WITH sy-dbcnt 'Records Written to ZTEST'.
Uploading data from Excel file format into internal table using TEXT_CONVERT_XLS_TO_SAP
REPORT  zupload_excel_to_itab.
TYPE-POOLS: truxs.
PARAMETERS: p_file TYPE  rlgrap-filename.
TYPES: BEGIN OF t_datatab,
      col1(30)    TYPE c,
      col2(30)    TYPE c,
      col3(30)    TYPE c,
      END OF t_datatab.
DATA: it_datatab type standard table of t_datatab,
      wa_datatab type t_datatab.
DATA: it_raw TYPE truxs_t_text_data.
* At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      field_name = 'P_FILE'
    IMPORTING
      file_name  = p_file.
*START-OF-SELECTION.
START-OF-SELECTION.
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*     I_FIELD_SEPERATOR        =
      i_line_header            =  'X'
      i_tab_raw_data           =  it_raw       " WORK TABLE
      i_filename               =  p_file
    TABLES
      i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
   EXCEPTIONS
      conversion_failed        = 1
      OTHERS                   = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
* END-OF-SELECTION.
END-OF-SELECTION.
  LOOP AT it_datatab INTO wa_datatab.
    WRITE:/ wa_datatab-col1,
            wa_datatab-col2,
            wa_datatab-col3.
  ENDLOOP.
reward if helpful
raam

Similar Messages

  • Use WEBUTIL for upload and download file to/from Database

    Dear friends
    I have a table with three columns (id , name , myDoc) myDoc is a BLOB, I would like upload word documents or PDFs or images to myDoc column, I use Oracle Form 10g, I try to use webutil to solve my problem, but I couldn't, Please help me.
    Thanks

    # Details
    # transfer.database.enabled : Can be TRUE or FALSE - allows you to disable
    # upload and download from the database server.
    # transfer.appsrv.enabled : Can be TRUE or FALSE - allows you to disable
    # upload and download from the application
    # server.
    # transfer.appsrv.workAreaRoot: The root of the location in which WebUtil can
    # store temporary files uploaded from the client.
    # If no location is specified, Application Server
    # user_home/temp will be assumed.
    # This location is always readable and writable
    # no matter what the settings in
    # transfer.appsrv.* are. This setting is
    # required if you need the Client side
    # READ/WRITE_IMAGE_FILE procedures.
    # transfer.appsrv.accessControl:Can be TRUE or FALSE - allows you to indicate
    # that uploads and downloads can only occur from
    # the directories named in the
    # transfer.appsrv.read.n and
    # transfer.appsrv.write.n entries and their
    # subdirectories. If this setting is FALSE,
    # transfers can happen anywhere.
    # transfer.appsrv.read.<n>: List of directory names that downloads can read
    # from.
    # transfer.appsrv.write.<n>: List of directory names that uploads can write
    # to.
    #NOTE: By default the file transfer is disabled as a security measure
    transfer.database.enabled=true
    transfer.appsrv.enabled=true
    transfer.appsrv.workAreaRoot=
    transfer.appsrv.accessControl=TRUE
    #List transfer.appsrv.read.<n> directories
    transfer.appsrv.read.1=c:\temp
    #List transfer.appsrv.write.<n> directories
    transfer.appsrv.write.1=c:\temp

  • How to approach for downloading a CSV file?

    I'm running the following query and  QoQ . Could you tell me how should I proceed for the "Download  CSV" file option?
        <!--- QoQ for FIRSTCONN --->
        <cfquery datasource = "XX.XX.X.XX" name="master1">
             SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as FIRSTCONN
                    , COUNT(Timedetail) as FIRSTOccurances
                    , EVENTS
             FROM  MyDatabase
             WHERE EVENTS = "FIRST"
             GROUP BY FIRSTCONN ;
        </cfquery>
        <!--- Detail Query --->
        <cfquery dbtype="query" name="detail1">
            SELECT  *
            FROM master1
            WHERE FIRSTCONN  >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">
            AND   FIRSTCONN  <  <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;
        </cfquery> 
        <!--- QoQ for SECONDCONN --->
        <cfquery datasource = "XX.XX.X.XX" name="master2">
            SELECT STR_TO_DATE(date_format(Timedetail,'%m-%d-%Y'),'%m-%d-%Y') as SECONDCONN
                   , COUNT(Timedetail) as SECONDOccurances
                   , EVENTS
            FROM  MyDatabase
            WHERE EVENTS = "SECOND"
            GROUP BY SECONDCONN ;
        </cfquery>
        <cfquery dbtype="query" name="detail2">
            SELECT  *
            FROM   master2
            WHERE  SECONDCONN  >= <cfqueryparam value="#form.startdate#" cfsqltype="cf_sql_varchar">
            AND    SECONDCONN  <  <cfqueryparam value="#dateAdd('d', 1,form.enddate)#" cfsqltype="cf_sql_varchar">;
        </cfquery> 
        <cfchart format="flash"  chartwidth="1000" chartheight="500" scalefrom="0" scaleto="50000" xAxisTitle="Dates" yaxistitle="Number of Connections">
             <cfchartseries  query="detail1" type="line" itemColumn="FIRSTCONN" valueColumn="FIRSTOccurances" >
             <cfchartseries  query="detail2" type="line" itemColumn="SECONDCONN" valueColumn="SECONDOccurances" >
             </cfchartseries>
        </cfchart>
    The cfform code I'm using is as follows:
    <cfform format="flash" preloader ="false">
    <cfformgroup type="horizontal">
      <cfinput type="dateField" name="startdate" label="Start Date" width="100" value="#form.startdate#">
      <cfinput type="dateField" name="enddate" label="End Date" width="100" value="#form.enddate#">
      <cfinput name="submitApply" type="submit" value = "Apply">
      <cfinput name="cancel" type="submit" value="Download CSV">
    </cfformgroup>
    Desired Output:
    I have attached the image for the output below. Please find it attached.
    Basically, if a date range is 21June to 21 July. The output must be as shown in the image. (I have omitted THIRDCONN etc for the sake of simplicity in my code).
    Please let me know how should I go about this problem and let me know if I can answer more questions.

    It's not built into the language. Your best bet is probably to put the CSV-Reading logic into its own class.
    Or find one of the thousands of classes that already implement such a thing.

  • Flat File Upload as CSV File in BPS.

    Hi Friends,
    We have to upload CSV file to BPS and as of now we are able to upload tab spaced file as per the How to Document.
    Kindly can some body post the COMPLETE CODE changes for Uploading the CSV File in both LOAD and WEB Function Modules.
    For complete code points are guaranteed.

    Hi BI,
    please check the following thread.
    Load flat file to BPS - GUI issue
    I've implemented the file upload for CSV file. please note the changes i've made -
    Code for INIT function module :-
    FUNCTION Z_BPS_FILE_UPLOAD_INIT_CSV.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_AREA) TYPE  UPC_Y_AREA
    *"     VALUE(I_PLEVEL) TYPE  UPC_Y_PLEVEL OPTIONAL
    *"     VALUE(I_PACKAGE) TYPE  UPC_Y_PACKAGE OPTIONAL
    *"     VALUE(I_METHOD) TYPE  UPC_Y_METHOD OPTIONAL
    *"     VALUE(I_PARAM) TYPE  UPC_Y_PARAM OPTIONAL
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP OPTIONAL
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL OPTIONAL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA OPTIONAL
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(ETO_CHAS) TYPE  ANY TABLE
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
      DATA: lto_chas TYPE yto_chas,
      ls_chas     TYPE ys_chas,
      ls_exitp    TYPE upf_ys_exitp,
      ls_mesg     TYPE upc_ys_mesg,
      ls_chasel   TYPE upc_ys_chasel, "<<<INSERT
      ls_charng   TYPE upc_ys_charng. "<<<INSERT
      DATA: lt_filetab TYPE filetable,
      ls_filetab   TYPE file_table,
      l_file       TYPE string,
      l_separator  TYPE char01,
      l_action     TYPE i,
      l_count      TYPE i.
      FIELD-SYMBOLS: <f> TYPE ANY. "<<<INSERT
    Try to get file name from parameter
      READ TABLE it_exitp INTO ls_exitp WITH KEY parnm = 'FILENAME'.
      IF sy-subrc = 0.
        l_file = ls_exitp-chavl.
      ENDIF.
    If no file name is given, prompt user for it
      IF l_file IS INITIAL.
        CALL METHOD cl_gui_frontend_services=>file_open_dialog
          EXPORTING
            window_title            = 'Select Upload File'
            default_extension       = 'csv'
            file_filter             = 'Text Files (*.csv)'
          CHANGING
            file_table              = lt_filetab
            rc                      = l_count
            user_action             = l_action
          EXCEPTIONS
            file_open_dialog_failed = 1
            cntl_error              = 2
            OTHERS                  = 3.                        "#EC NOTEXT
        IF sy-subrc <> 0.
          CLEAR ls_mesg.
          MOVE-CORRESPONDING syst TO ls_mesg.
          APPEND ls_mesg TO et_mesg.
          EXIT.
        ENDIF.
        CALL METHOD cl_gui_cfw=>flush.
        LOOP AT lt_filetab INTO ls_filetab.
          l_file = ls_filetab.
        ENDLOOP.
        CHECK l_action = 0.
      ENDIF.
      l_separator = 'X'.
    Upload file from front-end (PC)
    File format is tab-delimited ASCII
    l_separator = ';' .
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = l_file
         filetype                = 'DAT'
         has_field_separator     = l_separator
        TABLES
          data_tab                = gt_file_csv
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        CLEAR ls_mesg.
        MOVE-CORRESPONDING syst TO ls_mesg.
        APPEND ls_mesg TO et_mesg.
        EXIT.
      ENDIF.
    Create one dummy combination
    If we don't do this, the upload won't work since the second function
    will not be executed at all in case no transaction data exists so far.
    The combination must be a subset of the planning level!
      " >>> BEGIN INSERT
      CLEAR ls_chas.
      LOOP AT ito_chasel INTO ls_chasel.
        READ TABLE ls_chasel-t_charng INTO ls_charng INDEX 1.
        IF sy-subrc = 0.
          ASSIGN COMPONENT ls_chasel-chanm OF STRUCTURE ls_chas TO <f>.
          IF sy-subrc = 0.
            <f> = ls_charng-low.
          ENDIF.
        ENDIF.
      ENDLOOP.
      " <<< END INSERT
      COLLECT ls_chas INTO lto_chas.
      eto_chas = lto_chas.
    ENDFUNCTION.
    Include should contains following declarations-
    TYPES:      begin of itab_CSV,
                           text(255) type c,
                     end of itab_CSV.
    Global table to temporarily store loaded data.
    DATA: gt_file_CSV TYPE STANDARD TABLE OF itab_csv WITH DEFAULT
    KEY.
    Hope it will help you.
    Regards
    Tarun

  • Upload a CSV File

    I'm on 9i on a Microsoft Windows Server 2003.
    What are some of the native tools to Oracle 9i for uploading a CSV File to a Table in the Database?

    Alex
    I realize that "evangelist" is part of your job title. But are you really intending to exhume any old thread the search engine chucks that which may be relevant to your product? Because you are really going to start annoying people soon.
    Obviously you will claim that your company's dual GPL/commercial licensing policy means that you are not violating these forums' Terms of use. But as your ultimate aim is no doubt to get people to buy the non-GPL option I suggest that you are breaking this rule: Forums shall be used in a noncommercial manner only.
    Furthermore, a sufficient amount of this type of thread-bombing would (IMO) constitute unsolicited bulk e-mail, "junk mail," "spam" or chain letters.
    Namaste, APC

  • Fnd script for upload the ldt file

    Hi Expert,
       How to write script for upload the ldt file containing program ,value set ,lookup code and DFF ,for XXCUST schema?
    Thanks

    7f4a32e8-5494-4664-a2f3-632ede8de56c wrote:
    Hi Expert,
       How to write script for upload the ldt file containing program ,value set ,lookup code and DFF ,for XXCUST schema?
    Thanks
    FNDLOAD commands can be found in (Tips and Examples Using FNDLOAD (Doc ID 735338.1)).
    Thanks,
    Hussein

  • Netbeans - How to Upload a csv File

    Hi all
    A J2EE question from a java beginner:
    I am using NetBeans and JBoss to develop a web application.
    I need to create a JSP page for user to upload a csv file and then read from the csv file (the file is in certain fixed format).
    The csv file will be read line by line to be updated into database.
    In JSP Page I have this:
    <td align="left" scope="col"><input type="file" name="meterList" id="meterList"></td>
    <td><input type="submit" name="upload" id="upload" value="Upload File" ></td>What should I do in Servlet when I clicked on the "Upload" button?
    How if I want to control the uploading size and type of the the file?
    How to get the file to be processed in servlet?
    Your help is much appreciated.
    Thanks alot.

    this question has been asked a million times
    try searching next time
    and uploading a csv file has nothing to do with netbeans

  • "Cannot interpret data in file" error while using GUI_UPLOAD for .xls file

    Hi,
         I have made a program using FM GUI_UPLOAD to upload an .xls file to an internal table. But upon executing ,it gives error "Cannot Interpret data in file". I have seen in other posts people talking about GUI_UPLOAD FM to upload data from excel directly into internal table. Kindly help.
    Here is my code. I had tried using different combination for HAS_FIELD_SEPARATOR but still its not working.
    In my emp1.xls file , the data in each column is present in the same order as in the internal table. Although the first column in my internal table is NUMC. I dont know if that is causing the problem.
    REPORT  ZUPLOAD_1.
    data: itab TYPE TABLE OF zempl_master WITH HEADER LINE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\empl1.xls'
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = itab.
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP at itab.
      write:/ itab-emp_no,itab-name.
    endloop.

    hi amber22 you need to use the below fm to upload an xls file
    FORM EXCEL_UPLOAD .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME    = FILENAM
          I_BEGIN_COL = 1
          I_BEGIN_ROW = 1
          I_END_COL   = 6
          I_END_ROW   = 100
        TABLES
          INTERN      = xl_itab.
    * EXCEPTIONS
    * INCONSISTENT_PARAMETERS = 1
    * UPLOAD_OLE = 2
    * OTHERS = 3 .
      IF SY-SUBRC = 0.
    MESSAGE 'DATA UPLOADED SUCCESSFULLY' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " EXCEL_UPLOAD

  • Using Applescript for uploading pictures on the Internet

    Hello!
    I was wondering if there was a way to use Applescript with Firefox (or another browser)...?
    We have many many villas on our website, each one with lots of pictures. We are constantly adding new villas to our site and amending old ones.
    To add pictures we go to a page in our cms for each villa, located there is a drop down menu - image 1, image 2, 3 etc etc etc
    For each one we have to manually browse for and attach the photo. As you can guess this is a time consuming process, we have asked the web designer before for this but he is so busy and we have other more important stuff for him to be working on.
    As Applescript is so nifty I was wondering if anybody had an idea on how to use it for this process - i.e. have a folder full of pictures on the desktop and Applescript can add them?
    I have no idea if this is possible, any ideas?
    Many thanks and regards.
    Simon

    Yeah I completely understand, I just wanted to see if anybody knew if it could be done.
    Obviously for security reasons I can't let anybody into our CMS, so looks like it's a bit of an impossible task.
    Although it would be awesome to simply change the script slightly for each villa and let it do it all, this would be stupidly complicated as there are many menus to navigate to get to the uploading picture area.
    It would be great if I could do all that manually then once on that page (or given the page url to Applescript) set Applescript running to upload all the images for me.
    This is what that page looks like, if this helps?!:
    http://img535.imageshack.us/img535/241/screenshot20100415at141.png
    The drop down menu contains:
    Villa Plan
    Small Location Map
    Image Gallery 1
    Image Gallery 2
    etc
    etc
    I could arrange a folder with the pictures in order (i.e. Villa Plan first, then Small location Map, then the picture for 1 etc) so no worries about the Villa Plan and location map.
    I've got a feeling I'm just going to have to do it manually (I shall forever be uploading pictures), but I thought I would give it to some of you geniuses to mull over!
    For whoever creates a script I'll give you a discounted stay in Paradise... there's an incentive!!
    Many thanks and regards,
    Simon

  • How to use i for if condition in a for i in loop?

    Hi friends,
    I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
    cursor is
    select c1,c2,c3 from table1; -- 100 rows returned.
    open cursor
    loop
    fetch c1,c2,c3 into v1,v2,v3;
    for i in 1..3 loop
    if 'v'||i between 90 and 100 then
    v_grade := 'Excellent';
    elsif 'v'||i between 80 and 89 then
    elsif 'v'||i between 50 and 59 then
    end if;
    end loop;
    close cursor;
    This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
    But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
    Thanks for any advice in advance!

    user508774 wrote:
    Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
    So do not underestimate what can be done in SQL.
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
    SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
    The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
    These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
    Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
    Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
    Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
    The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
    Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
    To create a SQL program with parameters is done by using bind variables. Instead of
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    The following SQL source code should be created:
    v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
    The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
    The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
    In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
    UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
    Where v1 and the others are PL/SQL variables.
    That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
    The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features.

  • Okay so I set up my Time Capsule already and is now backing up 2 of my iMacs. Works great. What I want to know is how to use the TC to directly store files? I want to do this to delete some files but still have them on the TC for future reference..

    Okay so I set up my Time Capsule already and is now backing up 2 of my iMacs. Works great. What I want to know is how to use the TC to directly store files? I want to do this to delete some files on iMac 20inch but still have them on the TC for future reference..eg some movies on iTunes. I want to directly save them on the drive so I can delete them from iTunes and gain some storage. (Ps on iMac 20 inch (it's almost full - 320 GB) when I enter time machine, a tab comes up on finder which reads "Time Machine backups" it's able to be ejected like a disc or a connected device. On the iMac 20 inch, I dragged some files onto there as if using it like a hard drive. Is this the correct method? Then I went to my 27inch iMac and saw the "Time Machine Backups" hoping to see the files I dragged from the 20inch iMac. But the files were not there except a folder that said "Backups.backupdb". Can someone help me?

    It's not a good idea to use a network disk for both Time Machine backups and other things.  By design Time Machine will eventually consume all the space on its output disk, which will then cause problem for your other files.  I'd store those other files on an external disk connected to the Time Capsule.  The problem with that is that Time Machine will only back up files that are local to your Mac.  That means that you'll only have one copy of the files on or attached to your Time Capsule.
    By the way, you've been misled by poor field labeling on this forum into typing a large part of your message into the field intended for the subject.  In the future just type a short summary of your post into that field and type the whole message into the field below that.

  • How to Use 'uid' for AD Users Without Domain Name For User Log in OAM

    How to Use 'uid' for synchronized Active Directory (AD) Users into Oracle Internet Directory (OID) Without Domain Name For User Logins in OIDDAS and OAM
    We successfully integrated OAM 11g with EBS R12.1.3 Now all the AD user id's stored in fnd_users table as [email protected]
    How can we remove @abc.com
    We are using OID 11g and OAM 11g
    Found the similar note for OID 10G: How to Use 'uid' for AD Users Without Domain Name For User Logins in OIDDAS and SSO [ID 580480.1]
    We are in OID 11g.
    Any help on this greatly appreciated.

    I couldn't find any reference that could be helpful -- Please log a SR and see if this is supported and if the steps are available.
    Thanks,
    Hussein

  • How to use webcam for Yahoo Messenger on MacBook Pro, How to use webcam for Yahoo Messenger on MacBook Pro

    How to use webcam for Yahoo Messenger on MacBook Pro, How to use webcam for Yahoo Messenger on MacBook Pro because it's not working =(

    The cheap & easy way is to just drag the app to the Trash.
    If you want to get all of the associated files use an app deleting app like the free AppCleaner;
    http://www.freemacsoft.net/appcleaner/
    Just drag an app and drop it on the AppCleaner icon in the Dock and it will find and present to you all the files it thinks are associated with the app. You can uncheck any that you want to keep and then let AppCleaner Trash the rest.

  • Install Sun ONE Directory Server 5,2 & how to use it for authenticate user

    Good afternoon, Excuse, are newbie in the scope I am learning and putting desire to him, this in my situation I am trying to install Sun ONE Directory Server 5,2 since I understand that this it is application LDAP for Solaris, ok I want to install it to authenticate user against the system, that is to say, to be able to acces the server entering with a created user from the data base of LDAP and make think user that his created in the system. But the documentation that I finds indicates the installation of Sun ONE Directory Server 5,2 but it not clearly about how to use it for authentication. Some one have any manual step by step of Sun ONE Directory Server 5,2 installation and how to make it for authentication systems users.
    I read the forum seeking for anwser and i get confuse
    Thanks for the help and sorry for any inconvenient
    Message was edited by:
    Aku_28
    Message was edited by:
    Aku_28

    I think that I found the Sun endorsed book locations for using LDAP accounts that don't use authentication besides "crypt". I now can use an account with a "ssha" password. It can be more than 8 characters long.
    Chapter 14 System Administration Guide: Naming and Directory Services
    Read page 201 which is the pam.conf file pam_ldap setups. I edited my "/etc/pam.conf" file to reflect this
    Chapter 7 Directory Server 5.2 2005Q4 - Administration Guide
    Read page 316-318 which has a graphical technique to specify password syntax. I set it up and then tried the password by running "su - brahms". It now requires a longer password than 8 characters and it is set up to use "ssha" for that UID entry "brahms".

  • How to use parathesis for OR and AND OPERATOR...

    oracle 10g
    Hi
    Guys please help how to use parathesis for this below query its giving same output values for all my similar queries
    select count(balance) from balanace_tb
    where kk_code in(111,112,113)
    or
    kk_code in(111,1124,115,116) and sec_id in(50,51,52,53)
    or
    kk_code in(100,164,215,161) and sec_id in(53,51,52,59)
    or
    kk_code not in(100,164,215,162,134) and sec_id in(53,51,52,59)
    or
    kk_code in(100,164,215,16) and sec_id in(53,51,52,59)
    and
    open_date=20130331

    I assume you're looking for something like this?
    select count(balance) from balanace_tb
    where (   kk_code in(111,112,113)
           or (kk_code in(111,1124,115,116) and sec_id in(50,51,52,53))
           or (kk_code in(100,164,215,161) and sec_id in(53,51,52,59))
           or (kk_code not in(100,164,215,162,134) and sec_id in(53,51,52,59))
           or (kk_code in(100,164,215,16) and sec_id in(53,51,52,59))
    and open_date=20130331
    If not, please post some example data, the expected output from that data, and the logic you are expecting to use, as well as posting your database version.
    Re: 2. How do I ask a question on the forums?

Maybe you are looking for

  • As a solo CC member, can I install different Creative Cloud applications on different computers?

    I have a PC laptop and work desktop PC that I use for Audition to edit podcasts. I have a Mac at home that I want to use for photoshop (and also install it on my work PC, maybe). So that's 3 computers, but each Adobe application will only be on one (

  • Known Issues - Enrollment SA

    b Dynamic Document Generator (DDG) i Problem: When you deploy DDGSample.war, and try to run the samples,the following exception occurs - [javax.servlet.ServletException: com/adobe/idp/um/businesslogic/authentication/AuthenticationToken org.apache.jas

  • Where is the Nagios add on toolbar ?

    Hello, I used to have my Nagios add on toolbar on the bottom of Firefox. Since the version 29, Nagios toolbar has disappeared. Looked at the FAQ, and none of the answers helped me. When I try to customize my menu, or try to "display/undisplay" toolba

  • No Sky Sports since infinity installed!

    Hi,  we have just had infiity installed! The engineer came two days ago, installed infitiy and new vision box and router, SS1 & 2 are no longer there!! We have made at least 6 calls to india now and no one can help us, we are on the verge of going to

  • Can't Uninstall CS2 Premium

    When trying to uninstall my old CS2 Premium, an error message comes up that will not let me uninstall the program. The message reads: The installer could not start because of the following reasons: Missing or Invalid Personalization Information. Miss