The best way to insert values in a Nested Table

Hi!
I want to insert values from a SQL-query in a Nested Table.What's the best way to do it?
In addition,the only way that I've found is doing a query and when I've got the query result I insert it into the Nested Table.For instance:
FOR cur_row IN (SELECT id,nstreet from example Where id=3) LOOP
--here I'm inserting the values of the query in the nested table.
-- VarNestedTable is a Nested Table of Row_Type.
--Row_Type is an object with two fields:Id,Nstreet
VarNestedTable.extend;
VarNestedTable(Coincidents.Last):= Row_type(cur_row.id,cur_row.nstreet);
END LOOP;

How to Use Tables: Creating a Table Model.
very bad example:
class DataObject {
String name, age, numberOfMonkeys;
class DOTableModel extends AbstractTableModel {
  final String[] COLUMN_HEADER = { "Name", "Age", Monkeys" };
  List dataObjects;
  public String getColumnName(int column)  {
     return COLUMN_HEADER[ column ];
  public int getRowCount() {
    return dataObjects.size();
  public int getColumnCount() {
     return COLUMN_HEADER.size();
  public Object getValueAt(int row, int column) {
     DataObject do = dataObject.get( row );
     switch( column ) {
       case 0: return do.name;
       case 1: return do.age;
       case 2: return do.numberOfMonkeys;
}

Similar Messages

  • In Acrobat Professional 8, what is the best way to insert/combine multiple pdf's together in a large

    In Acrobat Professional 8, what is the best way to insert/combine multiple pdf's together in a large volume?
    We have 300 pdf reports and need to insert a 2 page cover page infront of each report. Not sure if Batch processing is best???
    Thanks for any tips.

    Probably each cover page is different too. I would probably just bite the bullet and do each individually. I would create the 2 cover pages in WORD or other word processor and print to cover.pdf. Then open a PDF and Pages>Insert Pages or the cover.pdf to the front of the open PDF and save as to the current PDF. Then repeat 299 times. Each time you would make the appropriate change to the DOC file and print a new cover.pdf file (you might want to turn off open in Acrobat for this processing in the printer properties to save time). Probably a good idea to keep a list of the files to check off what has been done (you can generate a list in DOS by Start>cmd, change the directory to your location [cd path], and do "dir >>list.txt". That will give you a list to use.). There may be an easier way, but by the time you get it figured out you might be done this way.

  • What is the best way of insertion using structured or binary type in oracle

    what is the best way of insertion using structured or binary type in oracle xml db 11g database

    SQL*Loader.

  • What is the best way to insert massive data into an existing excel file?

    dear gurus,
    i am wondering that what is the best way to insert massive data into an existing excel file, more performance perspective.
    the file is read from BDS , and we want to insert data into it .
    the way i can think of is
    1. OLE AUTOMATION
       i think performance will be a big problem
    2. Office integration
        i am not sure it's facing the same performance issue ?
    3 . XXL_SIMPLE_API/FULL_API
        I am not sure whether they can insert data into an existing excel file?
    could you please give me some advices?
    br.
    jun

    Hi,
    If you want to APPEND data( add data to an existing excel file) from SAP, then use GUI_DOWNLOAD fm with APPEND = 'X' paramter.
    Best regards,
    Prashant

  • Needs suggestion the best way database insertion using OSB

    Hi all, again and again I need your suggestion. Which is the best way for writing data to database using OSB in few tables as fastest as possible (speed consideration)?, should I make lots DB schema for supporting JCA adapter and transform each message and writing to database? OR should I call java callout then using EJB for writing to database?.

    Hi,
    We had the similar scenario in our project and this is my take on this.
    Its better to use a JCA DBAdapter to execute/invoke a stored procedure and then have the PL/SQL script for insertion into the Stored Procedure.
    As the OSB DBAdapter configuration is very tightly coupled to the DB structure any changes to the column types of the table will mean a regeneration of the adapter WSDL.
    In general even for other DB operations like select, delete, update... its is a good idea to use the stored procedure in conjunction with the DBAdapter to decouple the link to DB to some extent.
    Thanks,
    Patrick

  • What is the best practice for inserting (unique) rows into a table containing key columns constraint where source may contain duplicate (already existing) rows?

    My final data table contains a two key columns unique key constraint.  I insert data into this table from a daily capture table (which also contains the two columns that make up the key in the final data table but are not constrained
    (not unique) in the daily capture table).  I don't want to insert rows from daily capture which already exists in final data table (based on the two key columns).  Currently, what I do is to select * into a #temp table from the join
    of daily capture and final data tables on these two key columns.  Then I delete the rows in the daily capture table which match the #temp table.  Then I insert the remaining rows from daily capture into the final data table. 
    Would it be possible to simplify this process by using an Instead Of trigger in the final table and just insert directly from the daily capture table?  How would this look?
    What is the best practice for inserting unique (new) rows and ignoring duplicate rows (rows that already exist in both the daily capture and final data tables) in my particular operation?
    Rich P

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> My final data table contains a two key columns unique key constraint. [unh? one two-column key or two one column keys? Sure wish you posted DDL] I insert data into this table from a daily capture table (which also contains the two columns that make
    up the key in the final data table but are not constrained (not unique) in the daily capture table). <<
    Then the "capture table" is not a table at all! Remember the fist day of your RDBMS class? A table has to have a key.  You need to fix this error. What ETL tool do you use? 
    >> I don't want to insert rows from daily capture which already exists in final data table (based on the two key columns). <<
    MERGE statement; Google it. And do not use temp tables. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • What is the best way of selecting 99 colums from a table with 100 colums?

    Hi All,
    Suppose in a table T, I have 100 colums .I want to select 99 columns.So what is the best way to do the same?
    Anyone Help!
    Thanx in advance.
    Piyush

    Try this
    SQL> ed
    Wrote file afiedt.buf
      1  select column_name ||',
      2  ' from user_tab_columns
      3  where
      4     table_name = 'EMP'
      5*    and column_name not like 'EMPNO'
    SQL> /
    COLUMN_NAME||','
    ENAME,
    JOB,
    MGR,
    HIREDATE,
    SAL,
    COMM,
    DEPTNO,
    7 rows selected.
    SQL>

  • What's the best way to insert a long raw using OracleXSU12?

    I am currently reading a string from a document file and dump the content in a field in a row in a rowset in the xml file. I am just wondering if there is a better way to do this using the name of the text file instead. Thanks.
    null

    (1) you can't insert a sheet in Pages. Only tables !
    (2) before pasting your table in Pages, you may resize it so that it may fit in a page.
    (3) the users which took time to look in Pages User Guide are aware of a feature described as : Linking Text Boxes.
    It's a good answer to your problem.
    In a Word Processor document, create a text box and paste your table in the new tex box.
    At the bottom of the box you will see a small square with a symbol plus. It's a flag warning you  that the box contents is too large for the box.
    No problem, insert a page break to force the opening of a new page then read carefully the user guide :
    Applying what I highlighted, you will create a new box linked to the first one so that your table will flow in it.
    If it's not sufficient, you may link a third box …
    More, we are allowed to rotate the text boxes so you may edit them a way allowing them to host your landscape table.
    From my user's point of view, it's absolutely intuitive.
    Yvan KOENIG (VALLAURIS, France) dimanche 26 juin 2011 21:29:56
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • What's the best way to insert a numbers sheet into pages?

    I have some spreadsheets in numbers that I want to insert in pages...somehow it's not so intuitive.
    First of all when I paste them in a pages text box...a part of the sheets fall off the botom of the page
    Even a bigger problem...The should be in landscape...while all my text is in portrait...
    Anybody?
    Thx.

    (1) you can't insert a sheet in Pages. Only tables !
    (2) before pasting your table in Pages, you may resize it so that it may fit in a page.
    (3) the users which took time to look in Pages User Guide are aware of a feature described as : Linking Text Boxes.
    It's a good answer to your problem.
    In a Word Processor document, create a text box and paste your table in the new tex box.
    At the bottom of the box you will see a small square with a symbol plus. It's a flag warning you  that the box contents is too large for the box.
    No problem, insert a page break to force the opening of a new page then read carefully the user guide :
    Applying what I highlighted, you will create a new box linked to the first one so that your table will flow in it.
    If it's not sufficient, you may link a third box …
    More, we are allowed to rotate the text boxes so you may edit them a way allowing them to host your landscape table.
    From my user's point of view, it's absolutely intuitive.
    Yvan KOENIG (VALLAURIS, France) dimanche 26 juin 2011 21:29:56
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • What is the best way to Insert BLOB in DB?

    Hi,
    We are having a Table containing BLOB datatype & trying to populate it using JDBC. But simple insert is not allowing us to insert the data into table. As the alternative we used to firstly insert a empty_blob & later on update it using FOR UPDATE query resultset. This update operation is quite costly for our application & thus resulting in the drop of performance. Kindly suggest a better way to do the operation in a less costly & standard way.
    Thanks in advance.

    Ciao Giovanni,
    I thank you for your reply. We are already using JDBC driver version 10.2. Please refer to the extract from the driver jar file (OJDBC14.jar):
    Created-By: 1.4.2_08 (Sun Microsystems Inc.)
    Implementation-Title: ojdbc14.jar
    Specification-Vendor: Oracle Corporation
    Specification-Version: Oracle JDBC Driver version - "10.2.0.1.0"
    Implementation-Version: Oracle JDBC Driver version - "10.2.0.1.0"
    Implementation-Vendor: Oracle Corporation
    Implementation-Time: Wed Jun 22 11:19:45 2005
    The insertion is done in two steps:
    1.     First , enter an empty blob (Refer to the following prepared statements in Java):
    sFirst.setString(1, id);
    sFirst.setInt(2, 0);
    sFirst.setString(3, pid);
    sFirst.setBlob(4, BLOB.getEmptyBLOB());
    sFirst.execute();
    2.     Second, do a select for update
    Please help.
    Regards.

  • What's the best way to insert/update thousands records in multiple tables

    Can anyone give an example of how to insert/update thousands records in multiple tables on performance wise? or what should I do to improve the performance?
    Thanks
    jim

    You can see a set of sample applications in various scenarious available at
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html

  • What the best way to insert advertising before a movie?

    Hi!
    I've remarked on the web that many clips are precede by an advert. Does this advert is added in the code? Or, there is a way to tell the player to play first, the advert, and secondly the movie?
    Thanks for take to time to answers me.
    Daniel

    Hi! Thank you very much. Can you point me a tutorial to achieve this task?
    Daniel

  • I have some custom html5 tables, what's the best way to insert them in to Captivate 8?

    I have four html5 tables styled using css. They function perfectly in a browser - how do I get them into a Captivate slide?

    Hey, I think I’ve managed to crack it. So, I compressed my .html files to zip files. The HTML5 animation feature allows you to import zip files. So I imported the zip files into a Captivate slide and published the project to my desktop. On viewing it worked perfectly – maintaining all CSS. Perfect.
    Thanks for the help,
    Dan

  • Which is the best way to get data from user difine tables with condition

    Hi everyone,
    I would like using SBO DIAPI to get UDT data rows, there is a method of UserTable.getbykey can get one row information, but I like to get a list of rows from UDT, and the get list have its condition such as: field1="Type_A" ect.
    also I want to avoid using doquery get data from DB, because there is direct access DB potential Suspect.
    I am using SBO 2005 PL09 & visual studio(VB.net) 2005 and I only using DIAPI do not using UIAPI.
    Thanks for any advice.
    Kathy

    Hi Kathy,
    Unfortunately SBObob.GetObjectKeyBySingleValue only works for the B1 business objects as listed in the documentation.
    So, when you don't know the keys (= Code) of the records you want to get from your UDT - there's no way around using Recordset object's DoQuery method!
    Sorry,
    Frank

  • What is the best way to import a graphic? & How do I create a text frame for a figure caption?

    Hello all! I've been working from the FM book for almost 2 hrs trying to figure this out, so now I need your help. I am almost to this point:
    Problem I: Importing a graphic
    First of all, which is the best way?
    -Insert an anchor frame and then import the graphic into the frame OR
    -Just insert the graphic and get the anchor frame by default
    Here’s my importing and sizing problem:
    I hit ENTER to make a new paragraph line (side note: the book says make a new paragraph by hitting ENTER, import the graphic, and then ESC m+p to shrink wrap so that you can avoid the graphic overlapping the above text. I do exactly this (I believe), but my graphic still overlaps the above text when I shrink wrap. What the...?)
    I insert an anchored frame with position Below Current Line and alignment CENTER (I chose to the insert anchor frame, since this way I have control over its alignment, correct?)
    Anchor frame is selected when I import my image file
    In the Imported Graphic Scaling box, what do I select if my file is HUGE (3072x2304)?
    -Fit in selected rectangle (when I choose this the image imports small and fits in the anchored frame with lots of white space around it)
    -72 dpi
    -75 dpi
    -150 dpi
    -300 dpi
    -Custom dpi: 96 (I’ve tried changing this to a smaller number (20) and I get a message that says “cannot handle a bitmap of that size.”)
    I’ve had the best luck with selecting FIT IN SELECTED RECTANGLE, and then I just scale the image with my shift+click. If I choose 72 dpi or Custom, my image imports HUGE, and I just can’t manage it. I don’t have a method for resizing these images outside of FM.
    Problem II: Creating a text frame for a caption
    Once I have chosen FIT IN SELECTED RECTANGLE, I try to insert a text box underneath the image (and inside the anchor frame) to type a caption in it.
    In Create New Text Frame box, the default is Number 1 and Gap 0.25. I click SET.
    Next, I double-click inside the text frame to begin typing, but the cursor is OUTSIDE and UNDERNEATH the text frame! What the heck??? I’ve done this before and it has worked just fine. Then I had another problem where when I did get the text inside the text frame, I would select the text frame to move it, and it left the text behind! (I moved the frame but the text was separated from it and left behind.)
    THANK YOU in advance for your help. I hope I wrote this out clearly enough. I appreciate those who respond. P.S. I'm in FM 10.

    My favorite method is to use a one-cell table for graphics and captions.
    Import the graphic by reference into the table cell. Create a "Caption"
    paragraph tag and assign it to the table title. (The title can be set
    for above or below the table cell. I prefer below.) Now, whenever you
    insert this table, it will be ready for graphic and caption. Another
    advantage of this method is that graphic and caption always stay
    together at page/column breaks.
    When you create the table format above, assign it to have a -2.0 space
    above. Then, create a paragraph tag, such as "TableAnchor" and assign it
    -2.0 pt font size and -2.0 space below. (You can substitute a different
    point size, but it must be the same in all three places. The TableAnchor
    paragraph will hold the table and these settings let tables fit against
    the top margin where necessary. Otherwise, they dip down a bit.
    I wrote this from memory, so I hope I remembered all the steps!

Maybe you are looking for

  • Text Box Entry Validation

    We have a program that once a user enters a character the cursor jumps to the next entry box, they do not have to press Enter.  For example, we want the learner to type in the character 'H' for Home or 'B' for Business (or 'h' or 'b') for the type of

  • No commitment item entered in item 00001 1000

    hi, I have created Purchase Requisition using the T-code(ME51N), The following Error came "No commitment item entered in item 00001 1000" . How to resolve this error? Thanks,

  • SQL Error in Webconsole

    We are running Zenworks 7.00.0047 SP1. We ran product live update and went from IR 11 to IR 12. In the webconsole reports tab we get the following error. Details: [Microsoft][ODBC SQL Server Driver][SQL Server]Column 'nc_workstation.AssetType' is inv

  • Dates for the receipts

    Hi Below is the demand situation day    req/ recipt qty 1          -10 2         -10 3          -10 7          30             production order 8          -10 After SNP Run day    req/ recipt qty 1          -10 2          -10 3          -10 3         

  • CFapplication on Godaddy Server - Problem

    I'm getting the following error when I use the <CFapplication> tag. Godaddy disables the "CFRegistry" tag on their shared servers. And apparently the <cfapplication> tag uses <cfregistry> to run. Anyone know how to get around this? Thanks Security: T