Looping through table in ADOBE TABLE...HOW?

Hi,
I'm having a problem with writing scripts on looping through a dynamic table in adobe and disabling certain cell in the table.
can some one write me the script to help me out...please.... here is my email add. [email protected]
Regards,
Vinod

Hi Denise
You can use tableView for this which is available in htmlb.
There is a attribute in tableView called visibleRowCount.
The integer value that u give for this attribute , only that number of rows will be visible on your BSP page.
This is the sample code :
      <htmlb:tableView id              = "tb1"
                       headerText      = "Communication"
                       headerVisible   = "true"
                       design          = "alternating"
                       visibleRowCount = "4"
                       fillUpEmptyRows = "true"
                       table           = "<%= itab %>" >
                <htmlb:tableViewColumn
                 columnName     = "CURRENT_STATE"
                 title          = "CURRENT STATE"
                 edit           = "TRUE" />
.                     </htmlb:tableView>
Here tableview id  and table is mandotory field.
Give as many tableViewColumn as u have column in your internal table ( Here CURRENT_STATE is the name of the Column that I have in my internal table).
Here visibleRowCount is 5, so only 5 rows will be visible at a time .For other entries u have to click on
my click handler which is like a footer in a tableView, and next 5 entries will become visible and like that.
Before implementing this, fill your internal table
in OnCreate in Flow logic ( in do_init in case of MVC).

Similar Messages

  • How to loop through columns of a table?

    Hi, guys
    Is there a way to loop through each column of a table? If there is a way, then how?
    I have a table with columns of different datatypes , and I want to set default values for each column with a loop but don't know how to make it happen.
    For example,
    Table: Employees
    declare
      rec  Employees%ROWTYPE;
    begin
      for col in rec.empno .. rec.location loop
         if col = rec.empno then -- set default value for column empno;
      end loop;
    end;
    /Sorry, I am a newbie to PL/SQL. Please help!
    Thanks in advance.
    Edited by: HappyJay on 2010/05/11 10:36

    Hi,
    You can query the data dictionary views all_tab_columns (or user_tab_columns) to get the names of all the columns in a particular table.
    Here's an easy way (but not a very efficient way) to loop through them:
    SET     SERVEROUTPUT     ON
    BEGIN
         FOR  c IN ( SELECT  column_name
                         FROM    all_tab_columns
                  WHERE   owner     = 'SCOTT'     -- Remember ot use UPPER CASE inside quotes
                  AND         table_name     = 'EMP'
         LOOP
              dbms_output.put_line (c.column_name || ' = column_name inside loop');
         END LOOP;
    END;
    /I'm confused about what you want to do, though.
    Do you want the PL/SQL code to write and/or execute an ALTER TABLE command for each column?

  • Loop through records in a table and update

    Hi there,
    Need some help here please. Sorry new to Oracle. I'm working with Oracle 10g.
    I have a table like this;
    ID Amount Date
    123 5000 Oct-07-2011
    123 null Oct-09-2011
    124 7000 Oct-14-2011
    124 null Oct-17-2011
    124 null Oct-24-2011
    What I'm trying to do here is loop thruogh the records and update the amount that's null with the previous amount with the same ID.
    Some sample code that I follow for this?
    Thanks very much for your help.

    maybe some of this example migth help.
    SQL> select id, amount, tdate
      2    from (select 123 id, 5000 amount, to_date('Oct-07-2011','mon-dd-rrrr') tdate from dual union all
      3          select 123 id, null amount, to_date('Oct-09-2011','mon-dd-rrrr') tdate from dual union all
      4          select 124 id, 7000 amount, to_date('Oct-14-2011','mon-dd-rrrr') tdate from dual union all
      5          select 124 id, null amount, to_date('Oct-17-2011','mon-dd-rrrr') tdate from dual union all
      6          select 124 id, null amount, to_date('Oct-24-2011','mon-dd-rrrr') tdate from dual union all
      7          select 124 id, 8000 amount, to_date('Oct-25-2011','mon-dd-rrrr') tdate from dual union all
      8          select 124 id, null amount, to_date('Oct-28-2011','mon-dd-rrrr') tdate from dual)
      9  order by id, tdate;
            ID     AMOUNT TDATE
           123       5000 07-Oct-11
           123            09-Oct-11
           124       7000 14-Oct-11
           124            17-Oct-11
           124            24-Oct-11
           124       8000 25-Oct-11
           124            28-Oct-11
    7 rows selected
    SQL>
    SQL> select id,
      2         last_value(amount ignore nulls) over (partition by id order by tdate) amount,
      3         tdate
      4    from (select 123 id, 5000 amount, to_date('Oct-07-2011','mon-dd-rrrr') tdate from dual union all
      5          select 123 id, null amount, to_date('Oct-09-2011','mon-dd-rrrr') tdate from dual union all
      6          select 124 id, 7000 amount, to_date('Oct-14-2011','mon-dd-rrrr') tdate from dual union all
      7          select 124 id, null amount, to_date('Oct-17-2011','mon-dd-rrrr') tdate from dual union all
      8          select 124 id, null amount, to_date('Oct-24-2011','mon-dd-rrrr') tdate from dual union all
      9          select 124 id, 8000 amount, to_date('Oct-25-2011','mon-dd-rrrr') tdate from dual union all
    10          select 124 id, null amount, to_date('Oct-28-2011','mon-dd-rrrr') tdate from dual)
    11  order by id, tdate;
            ID     AMOUNT TDATE
           123       5000 07-Oct-11
           123       5000 09-Oct-11
           124       7000 14-Oct-11
           124       7000 17-Oct-11
           124       7000 24-Oct-11
           124       8000 25-Oct-11
           124       8000 28-Oct-11
    7 rows selected
    SQL>

  • Loop through a group of tables

    Someone who can help me with: I need to go a group of tables in a database, which have a common field. The idea is to do a select on that field in common according to a query criteria. thanks

    create table table1 as
    (select rid,identification,
            decode(identification,1,'Al',2,'Bo',3,'Che',4,'Doe',5,'Ed',6,'Fox',7,'Gil',8,'Hoss',9,'Ian',10,'Joe',11,'Ken',12,'Lou',13,'Moe',14,'Ned',15,'Oz',16,'Poe',17,'Red',18,'Sy',19,'Ted','Vic') name,
            Initcap(dbms_random.string('l',dbms_random.value(5,15))||' '||dbms_random.string('l',dbms_random.value(5,10))||' '||dbms_random.string('l',dbms_random.value(5,20))) info
       from (select level rid,
                    trunc(dbms_random.value(1,20)) identification
               from dual
             connect by level <= 10
    RID
    IDENTIFICATION
    NAME
    INFO
    1
    8
    Hoss
    Iqvispa Lmurse Zuzaozjmgruxk
    2
    5
    Ed
    Lomqevifqeeeo Nxlxnhdv Wlakstxjms
    3
    18
    Sy
    Znaked Eoenhxeeca Nrxpwjyt
    4
    14
    Ned
    Jbiebqxcowrw Ipuqfm Zlbjiumygtcnfgiq
    5
    16
    Poe
    Jmbwzhodm Ujcxeubr Ucikapudanbtyhrbla
    6
    11
    Ken
    Nwcdowlndfb Lzekz Fwmjhcufw
    7
    16
    Poe
    Ltiyuz Zuyevvf Ngeyowyyjvrh
    8
    2
    Bo
    Zrifwczbkktcouc Izpmaib Tmhkqatyahzuguwpw
    9
    6
    Fox
    Tsrghyzi Qdutdqqm Takrtwv
    10
    12
    Lou
    Zfgyftaidslpcg Osexqg Owaoafoipgn
    RID
    IDENTIFICATION
    NAME
    INFO
    1
    2
    Bo
    Agabtq Tanivdo Hiaybiuyyktitvwgjp
    2
    12
    Lou
    Znvcvycgllx Gtewsxz Lziuom
    3
    13
    Moe
    Qdzurj Cgdfmtslee Emtvhupylnalelbbacv
    4
    17
    Red
    Nwjjmqkfpxn Hiywfb Hrveoiegppo
    5
    1
    Al
    Bhnyjgnkmlsu Jbrdmiu Adwbpzbelyrebfq
    6
    11
    Ken
    Hsnccafffl Okfpeodw Znrmbrnxkxwi
    7
    8
    Hoss
    Olvwgjhtejhu Nvbofegy Kbanybopcg
    8
    1
    Al
    Cvnwwaw Hhzwsb Peuruso
    9
    19
    Ted
    Xuykzepjpdjrc Mmnxfdc Cdwfjvv
    10
    19
    Ted
    Zqmhv Mqxkio Mpbssxxurbxtaifud
    RID
    IDENTIFICATION
    NAME
    INFO
    1
    16
    Poe
    Gappv Ptkkgqh Zfbkoeb
    2
    3
    Che
    Ggbughdb Icdiwl Imtfng
    3
    9
    Ian
    Cadwemch Ckwdlrxs Kzdpanneushpp
    4
    7
    Gil
    Frlufjrk Amidybzd Rwlwqfxp
    5
    10
    Joe
    Rqvhbh Rbpdaklmsz Nhzkeblzmdgxvx
    6
    19
    Ted
    Sphkzeoean Epllenxz Cdpikiftoacwqrw
    7
    9
    Ian
    Ntovrotmwdaago Bpvdxmeofr Qfnpl
    8
    19
    Ted
    Sjookoa Ilotrpqyz Eaabfufbeeflb
    9
    17
    Red
    Pvzmbjepm Vevqae Oqnezylttqz
    10
    2
    Bo
    Rbjseracpal Exvukmsvt Auujopmdawrwzz
    RID
    IDENTIFICATION
    NAME
    INFO
    1
    12
    Lou
    Rmbjqggtwgvkuq Mgdxelhg Mcjsxldszzvsbnpex
    2
    15
    Oz
    Zdmfqyiqz Wrepkbn Jmvfrcwegqdxjeo
    3
    15
    Oz
    Klkzrjhvxo Xftxbac Ovhsvuvrvof
    4
    7
    Gil
    Pzktxz Kkopip Irfixa
    5
    17
    Red
    Hegcugpqxn Trdtcmkq Wljbm
    6
    1
    Al
    Pvlrqg Ceamqdxzh Mieubwiul
    7
    5
    Ed
    Uejsqrghek Yrqjfkjy Itnwowljg
    8
    13
    Moe
    Llguurt Hiqfycrkel Pcftjjbvbwimsqqlt
    9
    7
    Gil
    Hnsaeflly Arbml Ovmcwrzfqyy
    10
    2
    Bo
    Hmzxxlzvoqskjsx Itandsik Pxlqcdnxkv
    RID
    IDENTIFICATION
    NAME
    INFO
    1
    8
    Hoss
    Oogcgbjsmmqm Vxpknalu Hbxfvydnfdnqz
    2
    1
    Al
    Xaejofaeramguil Rtmtcbkpp Adpmrsytubflyfhoda
    3
    3
    Che
    Weyphtako Xendsrx Uhhatkyzhptgkg
    4
    15
    Oz
    Lhwpxgfvyh Xdvvcv Bxtueffbzkri
    5
    1
    Al
    Mjtpycls Myxftbcb Edbytrjwzppfdkqyn
    6
    2
    Bo
    Gujxzuzogigwdo Htzvfsfnh Cekmyezwlyuzcp
    7
    4

  • Looping through files in a folder, How to

    Looking for plsql code to read through files in a folder, and pass the name of the file found to a parm.
    The parm will then be used to open the table, process data to end of file, and then close the file. The file is then moved to an archive, and the next file in the folder is read, name of file passed to parm, file is opened, data is processed, and file is moved to archive....repeat until no files in folder.
    I only need some help with reading through the folder to find the table. I have code on how to open, process and move a folder...it's the file in folder read loop I am trying to develop.
    In summary, I am looking for some code showing how to read all tables in a folder and pass the name of the table found, until all files read.

    emss wrote:
    Yes, you understand....thank you. That's the primary objective of this thread....determine the name of the .csv file.
    The putline and so forth process the file. I need to find the file, it's name, and then process the .csv file.PL/SQL itself has no mechanism built in for determining the list of files in a directory.
    The Java solution is one of the easiest to implement as PL/SQL can interface fairly simply with Java functions which you can create on the database.
    There are other ways, but no way is going to be completely simple.
    Remember, from PL/SQL you will only really be able to get to files that the database server itself can see, so either files on the database server itself, or files on machines that the server itself has network mappings to that it can treat as if they are local files. It certainly won't be able to hack across the network to any client machines hard drive to read a list of files.

  • How to loop through XML data in a table of XMLType?

    Hi,
    I am failry new to xml document processing in Oracle using PL/SQL.
    My DB version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    I have successfully loaded an xml document into a table using the following two statements:
    1) CREATE TABLE mytable2 OF XMLType;
    2) INSERT INTO mytable2 VALUES (XMLType(bfilename('IMAGE_FILE_LOC', 'IFTDISB20100330172157C002.xml'), nls_charset_id('AL32UTF8')));
    Now I need to traverse through the various nodes within the xml document and extract values of elements of each node. The question I have is:
    How do I loop through a node? A VALID record is enclosed within the <checkItem> </checkItem> tags.
    Here is a snippet of the data in that xml document:
    ++++++++++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" encoding="UTF-8"?>
    <bdiData>
    <documentControlInfo>
    <documentInfo>
    <docDescription>Check images and data for Test Company, account number 1234567890</docDescription>
    <docID>
    <ID>20100330172157</ID>
    </docID>
    <docModifier>Test Company</docModifier>
    <docCreateDate>2010-03-30</docCreateDate>
    <docCreateTime>17:21:57-0700</docCreateTime>
    <standardVersion>1.0</standardVersion>
    <testIndicator>0</testIndicator>
    <resendIndicator>0</resendIndicator>
    </documentInfo>
    <sourceInfo>
    <sourceName>The Bank IFT</sourceName>
    <sourceID>
    <idOther>TheBankIFT</idOther>
    </sourceID>
    </sourceInfo>
    <destinationInfo>
    <destinationName>Test Company</destinationName>
    <destinationID>
    <idOther>FEI3592</idOther>
    </destinationID>
    </destinationInfo>
    </documentControlInfo>
    <checkItemCollection>
    <collectionInfo>
    <description>Items</description>
    <ID>1269994919135</ID>
    <Classification>
    <classification>Items</classification>
    </Classification>
    </collectionInfo>
    <checkItemBatch>
    <checkItemBatchInfo>
    <description>Paid Checks</description>
    <ID>1269994919135</ID>
    <Classification>
    <classification>Paid Checks</classification>
    </Classification>
    </checkItemBatchInfo>
    <checkItem>
    <checkItemType>check</checkItemType>
    <checkAmount>86468</checkAmount>
    <postingInfo>
    <date>2010-03-29</date>
    <RT>10700543</RT>
    <accountNumber>1234567890</accountNumber>
    <seqNum>009906631032</seqNum>
    <trancode>001051</trancode>
    <amount>86468</amount>
    <serialNumber>300040647</serialNumber>
    </postingInfo>
    <totalImageViewsDelivered>2</totalImageViewsDelivered>
    <imageView>
    <imageIndicator>Actual Item Image Present</imageIndicator>
    <imageViewInfo>
    <Format>
    <Baseline>TIF</Baseline>
    </Format>
    <Compression>
    <Baseline>CCITT</Baseline>
    </Compression>
    <ViewSide>Front</ViewSide>
    <imageViewLocator>
    <imageRefKey>201003260000738400851844567205_Front.TIF</imageRefKey>
    <imageFileLocator>IFTDISB20100330172157M002.zip</imageFileLocator>
    </imageViewLocator>
    </imageViewInfo>
    <imageViewInfo>
    <Format>
    <Baseline>TIF</Baseline>
    </Format>
    <Compression>
    <Baseline>CCITT</Baseline>
    </Compression>
    <ViewSide>Rear</ViewSide>
    <imageViewLocator>
    <imageRefKey>201003260000738400851844567205_Rear.TIF</imageRefKey>
    <imageFileLocator>IFTDISB20100330172157M002.zip</imageFileLocator>
    </imageViewLocator>
    </imageViewInfo>
    </imageView>
    </checkItem>
    <checkItem>
    <checkItemType>check</checkItemType>
    <checkAmount>045</checkAmount>
    <postingInfo>
    <date>2010-03-29</date>
    <RT>10700543</RT>
    <accountNumber>1234567890</accountNumber>
    <seqNum>008518967429</seqNum>
    <trancode>001051</trancode>
    <amount>045</amount>
    <serialNumber>200244935</serialNumber>
    </postingInfo>
    <totalImageViewsDelivered>2</totalImageViewsDelivered>
    <imageView>
    <imageIndicator>Actual Item Image Present</imageIndicator>
    <imageViewInfo>
    <Format>
    <Baseline>TIF</Baseline>
    </Format>
    <Compression>
    <Baseline>CCITT</Baseline>
    </Compression>
    <ViewSide>Front</ViewSide>
    <imageViewLocator>
    <imageRefKey>201003290000713900851896742901_Front.TIF</imageRefKey>
    <imageFileLocator>IFTDISB20100330172157M002.zip</imageFileLocator>
    </imageViewLocator>
    </imageViewInfo>
    <imageViewInfo>
    <Format>
    <Baseline>TIF</Baseline>
    </Format>
    <Compression>
    <Baseline>CCITT</Baseline>
    </Compression>
    <ViewSide>Rear</ViewSide>
    <imageViewLocator>
    <imageRefKey>201003290000713900851896742901_Rear.TIF</imageRefKey>
    <imageFileLocator>IFTDISB20100330172157M002.zip</imageFileLocator>
    </imageViewLocator>
    </imageViewInfo>
    </imageView>
    </checkItem>
    <checkItemBatchSummary>
    <totalItemCount>1028</totalItemCount>
    <totalBatchAmount>61370501</totalBatchAmount>
    <totalBatchImageViewsDelivered>2056</totalBatchImageViewsDelivered>
    </checkItemBatchSummary>
    </checkItemBatch>
    <collectionSummary>
    <totalBatchCount>1</totalBatchCount>
    <totalItemCount>1028</totalItemCount>
    <totalCollectionAmount>61370501</totalCollectionAmount>
    <totalCollectionImageViewsDelivered>2056</totalCollectionImageViewsDelivered>
    </collectionSummary>
    </checkItemCollection>
    <documentSummaryInfo>
    <totalCollectionCount>1</totalCollectionCount>
    <totalBatchCount>1</totalBatchCount>
    <totalItemCount>1028</totalItemCount>
    <totalDocumentAmount>61370501</totalDocumentAmount>
    <totalDocumentImageViewsDelivered>2056</totalDocumentImageViewsDelivered>
    </documentSummaryInfo>
    </bdiData>
    ++++++++++++++++++++++++++++++++++++++++++++++++
    Any ideas and or suggestions will be greatly appreciated.
    Cheers!
    Edited by: user12021655 on Aug 3, 2010 1:25 PM

    I really need to update my blog to get the example you are looking for posted. I did a quick search on the forums for XMLTable and found a good example at {message:id=4325701}. You will want to use OBJECT_VALUE in the PASSING clause where you need to reference the column in your table.
    Note: See the FAQ in the upper right for how to use the tag to wrap objects to retain formatting.  Also your XML is missing closing nodes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to loop through Multiple Excel sheets and load them into a SQL Table?

    Hi ,
    I am having 1 excel sheet with 3 worksheet.
    I have configured using For each loop container and ADO.net rowset enumerator.
    Every thing is fine, but after running my package I am getting below error
    [Excel Source [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may
    be error messages posted before this with more information on why the AcquireConnection method call failed.
    Warning: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified
    in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    [Connection manager "Excel Connection Manager"] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by
    another user, or you need permission to view and write its data.".
    Pleas suggest me the correct way of solving above issues.
    Thanks in advance :)
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

    Hi ,
    Please refer the below link for Looping multiple worksheet in a single SQL Table.
    http://www.singhvikash.in/2012/11/ssis-how-to-loop-through-multiple-excel.html
    Note:-If you using excel 2010 then you have to use EXCEL 12.0 .
    Above link explaining  step by step of Looping multiple worksheet in a single SQL Table.
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

  • Question about Looping through tables in Adobe Form

    Hello,
    We have an adobe form which is to be filled offline. It consists of a table. Table can have repeating rows and user can add\remove rows as they wish.  The cardinality of the context node where we need to bind this table data is set to 1…n
    We want to know the process to get all the values in the table back into our context node once the form is uploaded. I assume we need to loop through the table, and add elements to the context node.  Can someone please let us know if we’re on the right track, and provide some sample code if possible?
    <b>We can’t figure out a way to loop through a table inside an Adobe form.</b>
    We are using Web Dynpro Java with Adobe Livecycle Designer 7.1
    Your help is much appreciated.
    Thanks,
    Rob.

    Try using...
    for (z = 0; z < 16; z++) {
         this["cb"+z].setStyle("styleName", "cssCBstyle");
    That is the way to target them.  I haven't dealt with setting styles, so I can't answer for that aspect working or not.

  • How do I go about this? Creating table while looping through dates?

    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!

    thedunnyman wrote:
    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!I hope you are asking about writing a query to DISPLAY the data that way ... not to actually create such a massively denormalized table ....

  • How do I loop through tables, not columns in a table?

    Sorry if this is a long one. My problem is actually quite simple. I am trying to write either an ad hoc PL/SQL block or a stored procedure to loop 18 times (thru 18 tables) and perform a SQL query on those tables, returning 18 resultsets. I would like the results to show up on the screen (or in a spool file, whatever).
    So far I have tried 3 different approaches, none of which have worked.
    1. I tried to assign the select query to a variable (qry) and use EXECUTE IMMEDIATE qry. This forced me thru a variety of errors to declare variables and assign the result to them--EXECUTE IMMEDIATE qry into nm0, nm1, nm2...
    The problem with that was the resultset returned more than the variable was built for as there might be no rows returned, or it might be a thousand rows of data. So I tried changing the variables to VARRAYS, but it gave me a type mismatch as the underlying columns were NUMBER and VARCHAR2.
    DECLARE
         ctr number;
         TYPE NUMLIST IS VARRAY (1000) OF NUMBER;
         TYPE VARLIST IS VARRAY (1000) OF VARCHAR2(15);
         nm0 NUMLIST NOT NULL DEFAULT 1;
         nm1 VARLIST;
         nm2 NUMLIST NOT NULL DEFAULT 1;
         nm3 VARLIST;
         nm17 NUMLIST NOT NULL DEFAULT 1;
         qry VARCHAR2(2000) := 'klx_uln_p000_cells';
    BEGIN
    FOR ctr IN 1..17 LOOP
         IF ctr &lt; 10 THEN
              qry := 'SELECT
              A.DIM_0_INDEX,
              S0.SYM_NAME,
              A.DIM_1_INDEX,
              S1.SYM_NAME,
              A.DIM_2_INDEX,
              S2.SYM_NAME,
              A.DIM_3_INDEX,
              S3.SYM_NAME,
              A.NUMERIC_VALUE,
              B.NUMERIC_VALUE
              FROM
              KHALIX.klx_uln_p00'||ctr||'_cells A,
              KHALIX.klx_ucn_p00'||ctr||'_cells B,
              KHALIX.KLX_MASTER_SYMBOL S0,
              KHALIX.KLX_MASTER_SYMBOL S1,
              KHALIX.KLX_MASTER_SYMBOL S7
              WHERE
              A.DIM_0_INDEX=B.DIM_0_INDEX AND
              A.DIM_1_INDEX=B.DIM_1_INDEX AND...
              A.DIM_7_INDEX=S7.SYM_INDEX';
         ELSE
              qry := 'SELECT
              A.DIM_0_INDEX...
              A.DIM_7_INDEX=S7.SYM_INDEX';
         END IF;
         BEGIN
         dbms_output.put_line('SELECT FOR KLX_ULN_P00'||ctr||'_CELLS');
         dbms_output.put_line(nm16);
         dbms_output.put_line(nm17);
         EXECUTE IMMEDIATE qry into nm0,nm1,nm2,nm3,nm4,nm5,nm6,nm7,nm8,nm9,nm10,nm11,nm12,nm13,nm14,nm15,nm16,nm17;
    --     dbms_output.put_line(qry);
         dbms_output.put_line(nm16);
         dbms_output.put_line(nm17);
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
                   dbms_output.put_line('No data found for Query '||ctr);
         END;
    END LOOP;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
              dbms_output.put_line('No data found for Query '||ctr);
    END;
    2. So then I used REF CURSOR to create a stored procedure and return the values. That allowed me to run my query AND tokenize the tablenames with a counter so that it would loop through the different tables! However, I still could not get it to display the results without going to SQL Plus and typing 'print c;'.
    3. So, finally I tried to create a looping wrapper around the ref cursor to have some variable (ctr) increment so my query would get performed on table0_cells through table17_cells. This, too, did not work.
    If I manually go to SQL Plus and type:
    variable ctr number
    begin
    :ctr := 1;
    end;
    exec dupe_find(1,:c);
    it will execute for the first table (klx_uln_p001_cells) and I can then type 'print c' to see what was returned. But when I try putting this within a wrapper PL/SQL block with a Loop to make ctr go from 0 - 17 (to loop through table_names klx_uln_p000_cells to klx_uln_p017_cells), it does not work.
    Help! It should be very simple to loop through tables, shouldn't it? I just want a script that will loop through tables, perform a query on each table and display the results. For some reason, I can only find documentation examples on looping through columns that are all in the same table.
    Dave

    Here's a working example using your first strategy ...
    create table t1 (id number);
    create table t2 (id number);
    insert into t1 values (100);
    insert into t1 values (101);
    insert into t2 values (200);
    insert into t2 values (201);
    declare
    v_table_name user_tables.table_name%type;
    type ttab_id is table of t1.id%type index by binary_integer;
    tab_id ttab_id;
    begin
    for i in 1 .. 2 loop
    v_table_name := 't' || i;
    execute immediate 'select id from ' || v_table_name
    bulk collect into tab_id;
    dbms_output.put_line('query from ' || v_table_name);
    for j in 1 .. tab_id.count loop
    dbms_output.put_line(tab_id(j));
    end loop;
    end loop;
    end;
    There are many other ways to do this (especially if you need to do more than just print out the data).
    Richard

  • Loop through table's rows

    Hi folks,
    I have a table with multiple rows which each one of them contains one dropdown list.
    In my code I want to loop through this table rows and check each dropdown list's selected-item.
    How can I do this in code(JavaScript).
    Thank you,
    Yair

    Check this thread,
    it has solutions for JavaScript ind FormCalc.
    http://forums.adobe.com/message/3345384#3345384

  • How to populate dynamic table in Adobe Livecycle form with cfpdfform?

    Hello all,
    after two days search on the above topic without results I hope someone here can help me.
    The problem:
    I have an Adobe PDF form created with Adobe Livecycle Designer that has a dynamic table inside it. The table Table1 consists of a Header Row with 4 cells of text and a data row Row1 with four cells each one having a Textfield Cell1, Cell2,Cell3 and Cell4.
    Table1 sits inside a subform mytable. The subform is made to flow and the Row1 has the Binding Repeat Row for Each Data Item checked.
    Everything is enclosed within the standard subform form1.
    Whe I use the following code, I supposed that the table should have two rows..because it is said it will be dynamic:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <cfpdfform action="populate" source="test.pdf" destination="testout.pdf" overwrite="yes" >
    <cfpdfsubform name="form1">
      <cfpdfsubform name="mytable">
        <cfpdfsubform name="Table1">
          <cfpdfsubform name="Row1">
            <cfpdfformparam name="Cell1" value="1">
            <cfpdfformparam name="Cell2" value="2">
            <cfpdfformparam name="Cell3" value="3">
            <cfpdfformparam name="Cell4" value="4">
          </cfpdfsubform>
          <cfpdfsubform name="Row2">
            <cfpdfformparam name="Cell1" value="5">
            <cfpdfformparam name="Cell2" value="6">
            <cfpdfformparam name="Cell3" value="7">
            <cfpdfformparam name="Cell4" value="8">
          </cfpdfsubform>
        </cfpdfsubform>
      </cfpdfsubform>
    </cfpdfsubform>
    </cfpdfform>
    <cfpdfform action="read" source="testout.pdf" result="testout" />
    <cfdump var="#testout#">
    </body>
    </html>
    What happes is:
    The testout.pdf displays just one row,with the values 1,2,3,4 the second row is only visible when I export the data as xml but not within the PDF.
    Please can someone enlighten me?
    Thanks and regards
    Gilbert

    When populating your pdf fields, you can loop through all the records in a query like so...
       <cfloop from="1" to="#query1.recordCount#" index="i">
                <cfpdfformparam name="txtField1_#i#" value="#query1.Field1[i]#">
                <cfpdfformparam name="txtField2_#i#" value="#query1.Field2[i]#">
      </cfloop>
    This will handle two rows or thirty rows just the same.  In this case my fields in the pdf have the row # as a suffix.

  • BRF : Looping through a table (e.g. Do Until or While, etc..)

    Hello Colleagues,
    In BRFPLus I understand we can create Loop Expressions that allow you to loop through a table and perform different Actions based  on the retrieved contents of the table.
    We are not using BRFPLus (but the old BRF instead). Does anyone know how to build Loop Expressions in BRF without the use of ABAP Function Modules?
    Your feedback would be really appreciated.
    Thanks in advance.
    Regards,
    Ivor M.

    Hello Colleagues,
    In BRFPLus I understand we can create Loop Expressions that allow you to loop through a table and perform different Actions based  on the retrieved contents of the table.
    We are not using BRFPLus (but the old BRF instead). Does anyone know how to build Loop Expressions in BRF without the use of ABAP Function Modules?
    Your feedback would be really appreciated.
    Thanks in advance.
    Regards,
    Ivor M.

  • Looping through a table

    how do I loop through the following table and get it to insert records into another depending on the number that it finds in the value column. eg if there is 8 in the value column, 8 records should be inserted into another table with the same ID
    i forgot to paste an example table
    ID
    Name
    Value
    1
    john
    12
    2
    sarah
    20
    3
    Tom
    5
    I want it to look at the value column and if it is 12 it should add 12 rows with the same ID into another table. eg in the new table there will be 12 rows for John with an ID of 1. For Sarah there will be 20 rows with an ID of 2.
    sukai

    Sure!
    DECLARE @sourceTable TABLE (ID INT, Name VARCHAR(20), Value INT)
    INSERT INTO @sourceTable (ID, Name, Value) VALUES (1, 'john', 12),(2, 'sarah', 20),(3, 'Tom', 5)
    This mocks up your source table (where your data is coming from). We're simply creating a table variable, and populating it with your example data.
    DECLARE @numbers TABLE (value INT)
    WHILE (SELECT COUNT(*) FROM @numbers) < (SELECT MAX(Value) FROM @sourceTable)
    BEGIN
    INSERT INTO @numbers (value) VALUES ((SELECT COUNT(*) FROM @numbers)+1)
    END
    This creates an example numbers table. The while causes the code to loop until there are as many rows as the maximum value for the Value column in your example data. Each time the loop iterates it inserts a row, causing the COUNT(*) to be one more each time,
    we add one to that, and insert it into the numbers table.
    INSERT INTO destinationTable
    SELECT s.ID, s.Name, s.Value
    FROM @sourceTable s
    INNER JOIN @numbers n
    ON s.Value >= n.value
    ORDER BY s.ID
    This performs an insert select to a made up table. We join the rows from @sourceTable (your example data) to the @numbers table where the Value column from @sourceTable is less than or equal to the value column in the numbers table. If s.Value is 1
    we'll perform this join once. If it's 2, twice and so on. This works because of the way we set up the numbers table. If we had insert multiple 1's it would cause additional joins.
    A numbers table is a handy tool to have for things like this were you need iterations. Create a database (or schema) on your database and call it something like 'Toolbox'. In that database/schema you can put things like this that have little to do with your
    actual data, but come in handy. You can make your numbers table as long as you need. It totally wouldn't hurt at all to have a numbers table with hundreds of thousands of rows. They're just int's, they don't eat much :).
    Let me know if you'd like anything clarified more.

  • Loop Through Excel Files and Load into SQL Server Table

    I'm following the example here.
    https://www.youtube.com/watch?v=_B83CPqX-N4
    I'm pretty sure I did all the steps, but for some reason my project is not running.  I'm thinking there is a 32-bit or 64-bit issue lurking in here somewhere.
    Here's my error message.
    SSIS package "C:\Users\Ryan\Documents\Visual Studio 2010\Projects\Loop through Multiple Excel sheets and load them into a SQL Table\Integration Services Project1\Package.dtsx" starting.
    Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
    Error: 0xC0209303 at Package, Connection manager "Excel Connection Manager": The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode. Error code: 0x00000000.
    An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x80040154  Description: "Class not registered".
    Error: 0xC001002B at Package, Connection manager "Excel Connection Manager": The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
    For more information, see http://go.microsoft.com/fwlink/?LinkId=219816
    Error: 0xC020801C at Data Flow Task, Excel Source [2]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209303. 
    There may be error messages posted before this with more information on why the AcquireConnection method call failed.
    Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: Excel Source failed validation and returned error code 0xC020801C.
    Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
    Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
    SSIS package "C:\Users\Ryan\Documents\Visual Studio 2010\Projects\Loop through Multiple Excel sheets and load them into a SQL Table\Integration Services Project1\Package.dtsx" finished: Failure.
    The program '[5392] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
    I have 32-bit Excel and 64-bit SQL Server.  Is that the issue?  Can someone tell me what's wrong here?
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Sa-weeettttttt!!  Thanks.  I figured that's what it was.  For the benefit of others, this link shows you exactly how to make the modification recommended above.
    http://help.pragmaticworks.com/dtsxchange/scr/FAQ%20-%20How%20to%20run%20SSIS%20Packages%20using%2032bit%20drivers%20on%2064bit%20machine.htm
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Maybe you are looking for

  • How can I erase the hard drive securely?

    I want to sell my old iMac G3 with OS 9.2. First I'd like to erase the hard drive securely, so that no information can be recovered later. OS X allows you to do this easily with the Erase tab in Disk Utility. Can anyone advise how this can be done in

  • QT Line item Document flow

    Hie Guys, Can one help me find the table where i can see the link between Quotation line item and oppurtunity line item. in the QT at item level we will have a tab Document flow where we can see the relationship between quottaion line item and oppurt

  • SSL errors, where are the logs ?

    Hi, This morning I meet an Unexpected Error on Netscape Directory Server during the regsitration of a new certificatre (from Verisign). The text was : "There was an error while writing certificate file" this is the first time I found this error, befo

  • League of Legend's Air Debug luncher error!

    Ok I am desprate here, after a really long time of searching for a proper solution for this problem and after spending money for it I came here to post cause I simply do not know what the hell is happening. I have few free time in my days as a archit

  • DW CS5.5 Device Testing

    Hello. I have created an Android mobile app using Dreamweaver cs5.5. I am able to test it with the emulator and using Device Central. How can I test it on the actual device? I have not been able to find out by searching. All searches show how to do i