Formating During CSV Upload for Existing Table

When you are trying to upload a csv file into an existing table
What type of exspression does the format text box accept.
( from top to bottom ) the upload page shows
column name
data type
format **** what type of expressions can I put here? PL/SQL block? nvl, substr?
lenght
then the column data from the file

Hi Bob,
Where exactly are you stuck? In the example that Tony linked, all you have to do is modify ~line 53 to the number of columns that will go into your table (and the name of the file browse item).
i.e.
APEX_COLLECTION.ADD_MEMBER(
                            p_collection_name => c_collection_name,
                            p_c001 => v_curr_row(1),
                            p_c002 => v_curr_row(2) -- add more of these for the number of columns that will be in your csv file);Or does the example not meet your requirements? If I interpret correctly, you want the user to be able to upload a file where they have specified the column names at the top of the csv file? I have created an example using this technique, although I am not entirely happy with it yet (for the lack of confirming the data that is to be inserted).
Ta,
Trent

Similar Messages

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • CSV upload and update table fields

    Hi,
    Is there any way to update any field of the underlying table from HTMLDB while importing the CSV file?For e.g, if there are XYZ table have 200 ermployee where empno is primary key.
    Once we upload the data from CSV its fine.Now after 2 weeks i need to update the sal and ename corresponding to the previous 100 employees only.So now when i trying to update the data a unique constraints violation occurs since the empno have already present so my concern is that -- how to get out of this problem specially when updation of huge no. of records needed and also no updation required for some records already present?Do the CSV update be helpful on that circumstances?
    One thing we can do that we can track down the list of 100 employee whose information going to be updated.Put those info in excel and add rest 100 emplyee to that excel and again doing the CSV upload ?
    This is a huge issue and not only the tedious task but also errorprone and that task will be increased with the amount of data increasing in the table.
    Please anyone can suggest ?
    Regards,
    ROSY.

    The best way to solve your problem is next way.
    1º) Save the file with the data to import like a BLOV ITEM.
    Ok it can be done. CSV placed on BLOB data field.2º) Make a procedure to manage this BLOV item that can be fired by user pushing a buttom. (you can do it easy from HTMLDB).
    how to manage ? What need to be fire to push the CSV to the target table with the actual field population ?3º) Into this procedure insert the records freely and dont worry for anything more. (maybe you can be worry about duplicate records is so, only, into this same procedure make any pl/sql lines to be sure record is not duplicate before insert)
    ? ? ? If the data already exist it should be needed to truncate before insert that is not my reqr rather the existing data should be updated based on PK if any chages occurs in the CSV fo that data.4º) after you are sure the insert work properly and if you need any other treatment to record, with a trigger in the table or calling any other procedure from the same trigger make the traeataments that you need.
    that can be done highly .......before insert trigger.Remember. Dont put any commit.
    sure.......5º) Go down from horse. Dont take coffe or Tea in exceed. And remember all we are the same, people that only want go to eat with childs in week-end.
    i m in land no way to go down........nothing i take ya eat & eat much ....but this is not the right place for making comments about Weekend....Regards and good luck.
    anyway embargo starts...........enjoy Cheers...........Wish u All Hp XMas...

  • Loading data from .csv file into existing table

    Hi,
    I have taken a look at several threads which talk about loading data from .csv file into existing /new table. Also checked out Vikas's application regarding the same. I am trying to explain my requirement with an example.
    I have a .csv file and I want the data to be loaded into an existing table. The timesheet table columns are -
    timesheet_entry_id,time_worked,timesheet_date,project_key .
    The csv columns are :
    project,utilization,project_key,timesheet_category,employee,timesheet_date , hours_worked etc.
    What I needed to know is that before the csv data is loaded into the timesheet table is there any way of validating the project key ( which is the primary key of the projects table) with the projects table . I need to perform similar validations with other columns like customer_id from customers table. Basically the loading should be done after validating if the data exists in the parent table. Has anyone done this kind of loading through the APEX utility-data load.Or is there another method of accomplishing the same.
    Does Vikas's application do what the utility does ( i am assuming that the code being from 2005 the utility was not incorporated in APEX at that time). Any helpful advise is greatly appreciated.
    Thanks,
    Anjali

    Hi Anjali,
    Take a look at these threads which might outline different ways to do it -
    File Browse, File Upload
    Loading CSV file using external table
    Loading a CSV file into a table
    you can create hidden items in the page to validate previous records before insert data.
    Hope this helps,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • CSV upload for end user

    I've searched all over the web and this forum and haven't found exactly what I'm looking for. I see this referenced a lot (http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/), but it's still a little too technical for me to figure out.
    Is there a packaged app or a dumbed down "how to" for creating a csv upload? I want the end user to be able to upload a csv file (same columns/headings, but the number of rows will vary) and display the table they just uploaded in a report.
    Thank you!!

    Hi Bob,
    Where exactly are you stuck? In the example that Tony linked, all you have to do is modify ~line 53 to the number of columns that will go into your table (and the name of the file browse item).
    i.e.
    APEX_COLLECTION.ADD_MEMBER(
                                p_collection_name => c_collection_name,
                                p_c001 => v_curr_row(1),
                                p_c002 => v_curr_row(2) -- add more of these for the number of columns that will be in your csv file);Or does the example not meet your requirements? If I interpret correctly, you want the user to be able to upload a file where they have specified the column names at the top of the csv file? I have created an example using this technique, although I am not entirely happy with it yet (for the lack of confirming the data that is to be inserted).
    Ta,
    Trent

  • Generating SQL Script for Existing Tables and DBs

    Hello,
    is it possible to generate automatically a SQL-Script from an existing table or oracle database ?
    I want to export an existing table from an Oracle DB (g11) if its possible with the data.
    Perhaps somebody could me explain how to to do this.
    I am using the "SQL Developer 2.1" and the "enterprise manager konsole".
    I'm a rookie in using this tools.
    Thank you for any informations.
    N. Wylutzki

    If you want to export data, you should use the export utility. This is documented:
    http://tinyurl.com/23b7on

  • How to add columns for existing table dynamically?

    Hi,
    I created table structure only. I want to add columns for this existing  table. Columns are not fixed, according to the  user choice i  need to write code.
    Plz give me reply asap.
    Thanks
    Shirisha

    Hi Shirisha,
    I think the following code snippet will help you.
    int l_no_cols = 0;
    //Get the number of columns in this variable, something like the following
    //l_no_cols = wdContext().currentContextElement().get<Context_attribute_name>;
    IWDTable l_tab;
    IWDTransparentContainer l_tbl_cont = (IWDTransparentContainer)view.getElement("TableDataCont");//ID of Container
    l_tab = (IWDTable)view.getElement("TableData");//ID of Table
    l_tab.setVisible(WDVisibility.VISIBLE);
    l_tab.bindDataSource(wdContext.nodeTable_Data().getNodeInfo());
    for(int a = 1; a <=l_no_cols; a++)
    //Creating the column
    IWDTableColumn l_tab_col = (IWDTableColumn)view.createElement(IWDTableColumn.class,"COL"+a);
    //Creating Caption for Column Header
    IWDCaption l_tab_cap = (IWDCaption)view.createElement(IWDCaption.class,"Caption"+a);
    l_tab_cap.setText("Col"+i);               
    l_tab_col.setHeader(l_tab_cap);
    //Creating Table Cell Editor for column
    IWDInputField l_tab_cell = (IWDInputField)view.createElement(IWDInputField.class,"CellEditor"+a);
    //creating context node attribute for the column dynamically
    wdContext.nodeTable_Data().getNodeInfo().addAttribute("Col"+i,"com.sap.dictionary.String");
    l_tab_cell.bindValue(wdContext.nodeTable_Data().getNodeInfo().getAttribute("Col"+i));
    l_tab_col.setTableCellEditor(l_tab_cell);
    l_tab.addColumn(l_tab_col);
    l_tbl_cont.addChild(l_tab);
    Regards,
    Alka

  • How to create a partiotion for existing table

    Hi,
    There ia one table in database with data. I want to create a partion for this table. data loss of data is not an issue.
    Please provide the query for this.
    Regards,
    Venki

    An existing non-partitioned table cannot be partitioned. You will have to create a new, partitioned table and move the data (if you care to keep it) from the old table to the new table, potentially followed by dropping the old table and renaming the new table to use the old table name.
    If you do not have a downtime window to accomplish this, you can use DBMS_REDEFINITION to assist. That, however, is just adding a bit of extra complexity on top of the basic procedure in order to support users accessing the table while you're building the new table. Unless your downtime window is insufficient to accomplish the move manually, I wouldn't bother with DBMS_REDEFINITION.
    Justin

  • Maintain number range interval for master data upload for existing employee

    Hi  Experts,
    1)I have the scenario to upload additional data for existing employees in PA. Employees are already existed in SAP HR , But additional Infotypes are required to maintain for those emploees
    2) I have the senario where i have to upload master data for new employees.
    Pls give the detailed description of how to maintain number range interval i.e. External or Internal for upload in both the above scenario. Do we have to maintain number range manually in master data record & then upload it Through BDC or LSMW?
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    Edited by: Rob Burbank on Jan 12, 2011 3:49 PM

    >
    s c patil wrote:
    > 2) For new employees i have to maintain desired ( my or client?) number range in SAP system as External number range & then default that number range in NUMKAR & then maintain those number range in master data record & then get the data template filled by client & then upload the data & after that create new number range which is next to existing External number range as an  Internal number range. & then default that Internal number range.
    >
    > Pls reply ASAP
    Yes Mr. Patil...
    For existing employees
    you need to execute HIRING ACTION Through BDC with External number range. While recording you have to use atleast three infotype i.e. IT0000,IT0001,IT0002. In addition you can upload other infotype through PA30.
    For new employees
    While configuration you can create another number range as internal  for new hiring. and use NUMKR feature as well.
    Here I don't understand that why r u looking for upload process for new hiring, if it is not mass hiring. It should be day to day activities which would be done by user through PA40.
    Best Regards,
    Anand Singh

  • Create table for existing table

    dear all
    I have a partition table with millions records and i want to create table from that table
    and i want the new table that i create it is contain the same structure(partition) and contain all data
    i write this code
    create table abc as select * from cda;
    but this script donot work as i want (same structure(partition) and contain all data)
    so anybody can help me
    best regards

    And it is not possible to alter the structure of the table in place? It sounds like you are going to be copying all the data from the current table to a new table and then back to the existing table once the existing table has been altered-- that is going to be very expensive in terms of resources, time, downtime windows, etc. Generally, you can just alter the table in place...
    Assuming you really want to copy all the data twice, and that the new (staging?) table really needs to have the same partitioning scheme as the primary, the DBMS_METADATA suggestion would seem to work. Moving the data from the exisiting table to the staging table, you might consider partition exchange if you want the staging table to have the same indexes that the current table has.
    Justin

  • Csv file uploading for database table creation

    Hi there,
    I'm in the process of making an application that will be able to upload a csv file and create a table based on the same file. As of now, I have managed to make my application upload a csv file into the database. My problem now is to transfer the data in the csv into a table. If there is a function that can do this, please let me know. But as of now, I have tried all that I can but in vain. I would appreciate any assistance rendered as to how I can go about this.
    Kind regards,
    Lusuntha

    hai Lusuntha ,
    Go to search forum and type "upload within html db".here u will find the required information ,as well as the code.go for each topic in the search result.

  • Suggestions for table partition for existing tables.

    I have a table as below. This table contains huge data. This table has so many child tables .I am planning to do a 'Reference Partitioning' for the same.
    create table PROMOTION_DTL
      PROMO_ID              NUMBER(10) not null,
      EVENT                 VARCHAR2(6),
      PROMO_START_DATE      TIMESTAMP(6),
      PROMO_END_DATE        TIMESTAMP(6),
      PROMO_COST_START_DATE TIMESTAMP(6),
      EVENT_CUT_OFF_DATE    TIMESTAMP(6),
      REMARKS               VARCHAR2(75),
      CREATE_BY             VARCHAR2(50),
      CREATE_DATE           TIMESTAMP(6),
      UPDATE_BY             VARCHAR2(50),
      UPDATE_DATE           TIMESTAMP(6)
    alter table PROMOTION_DTL
      add constraint PROMOTION_DTL_PK primary key (PROMO_ID);
    alter table PROMOTION_DTL
      add constraint PROMO_EVENT_FK foreign key (EVENT)
      references SP_PROMO_EVENT_MST (EVENT);
    -- Create/Recreate indexes
    create index PROMOTION_IDX1 on PROMOTION_DTL (PROMO_ID, EVENT)
    create unique index PROMOTION_PK on PROMOTION_DTL (PROMO_ID)
    -- Grant/Revoke object privileges
    grant select, insert, update, delete on PROMOTION_DTL to SCHEMA_RW_ROLE;I would like to partition this table .Most of the queries contains the following conditions.
    promo_end_date >=   SYSDATE
    and
    (event = :input_event OR
    (:input_Start_Date <= promo_end_date           
    AND promo_start_date <= :input_End_Date))Any time the promotion can be closed by updating the PROMO_END_DATE.
    Interval partioning on PROMO_END_DATE is not possible as PROMO_END_DATE is a nullable and updatable field.
    I am now to table partition.
    Any suggestions are welcome...

    DO NOT POST THE SAME QUESTION IN MULTIPLE FORUMS PLEASE!
    Suggestions for table partition of existing tables

  • How to Removed VAT during DTW upload for Invoices and Credit Notes

    Hi Experts
    Please help.
    Every time I import AR Invoice and  Ar credit Notes there is an automatic posting to VAT  even if the template has the same price after VAT and zero discount.
    How to removed this?
    Regards,
    Sandra

    Hi Julie
    As requested. The SO is VAT code for nonvat or zero vat
    As requested
    Header
    RecordKey     DocEntry     CardCode     CardName     Comments     DiscountPercent     DocCurrency     DocDate     DocDueDate     DocNum     DocRate     DocTime      DocTotal      DocType     JournalMemo     NumAtCard     Reference1     Reference2     Series     TaxDate
    1     TRUE     MC002 A     ABENSON INC.                    20090930     20060428          1           13,950.0000      dDocument_Service       OB AR Invoices 09.30.09     SI#044792          SI#044792          20060227
    Lines/Details
    RecordKey     LineNum     AccountCode      LineTotal      VatGroup
    RecordKey     LineNum     AccountCode      LineTotal      VatGroup
    1          392000000     13,950.00      SO
    Regards,
    Amy

  • How add new field as primary key for existing table

    Hi,
    There is table with name REVIEWER_REUSE_EFFORT and the table has 8000 rows in it.
    Now the enhacement i must do on this table is there is no primary key on this table. so i must create a ID also add values to this table of ID
    Table structure is like this
    Create table REVIEWER_REUSE_EFFORT
    PRO_ID number,
    POBJ_ID number,
    TASK_ID number,
    POTENTIAL_EFFORT number,
    COMMENTS varchar2(1200),
    CREATED_BY varchar2(100),
    CREATION_DATE sysdate
    UPDATED_BY varchar2(1200),
    UPDATED_DATE sysdate
    Please suggest me how to add values in that 8000 rows
    Thanks
    Sudhir

    Hi,
    If you want to add a new column and update the new column with sequence of number
    alter table REVIEWER_REUSE_EFFORT add (ID number);
    update REVIEWER_REUSE_EFFORT  set ID=rownum;Regards,
    Prazy
    Edited by: Prazy on Jun 21, 2010 3:13 PM

  • HOW to enable oracle advance compression for EXIST partitioned table

    Hi All,
    I have to enable oracle advance compression for existing table which PARTITION BY RANGE then SUBPARTITION BY HASH.
    ORacle version: 11.2.0.2.0
    Please provide me any relevant doc or any exp.
    Thanks in advance.

    could not see any text for how to enable oracle advance compression for EXIST partitioned table.RTFM.
    From the resource above:
    How do I compress an existing table?
    There are multiple options available to compress existing tables. For offline compression, one could use ALTER TABLE Table_Name MOVE COMPRESS statement. A compressed copy of an existing table can be created by using CREATE TABLE Table_Name COMPRESS FOR ALL OPERATIONS AS SELECT *. For online compression, Oracle’s online redefinition utility can be used. More details for online redefinition are available here.
    "

Maybe you are looking for

  • Enhanced Video podcast with chapters..can we change the color of the text?

    Enhanced Video podcast with chapters..can we change the color of the text? Yo know when yo make a marker and then name it and put in the url name an then the url. Well it looks great on GB but when it is exported it is always blue and you cant see it

  • Newbie: What program to use for just plain ASCII text?

    I'm new to Mac and wanting to create a plain ASCII text document (not RTF or else). In Windows I would use NotePad. What do I use on Mac? I tried "TextEdit" but it didn;t allow me to same it as "plain text" or similar. I want absolutely no formatting

  • Question abt using 2 tableview

    Hi, I 'm a iphone programming newbie. I m trying to implement an app with multi-level tableviews. The idea is if someone selects something on the first screen say then a new view opens(tableview) Quote: car make> list of models Honda > Acura, S2000,a

  • JTextArea_FontProblem

    Hi all, I have one Screen full JTextArea...on the window following two check boxes, one combobox.In the combo box when i select the item and check the check box immediately the text in the JtextArea should be changed into the size whatever I selected

  • Free trial version unable to convert jpg to pdf

    I have downloaded the free trial of adobe but it will not allow me to convert a jpg to pdf.  Does anyone know if I have to buy adobe in order to do so?