How to create a table with varied number of columns?

I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
Can I do it? How? Thanka a lot.

Why did you create a new thread for this?
How to create a table with varied number of columns?

Similar Messages

  • Table with varying number of columns

    Hello experts,
    my issue:
    I need to print a table with varying number of columns. Depending on if all cells of a certain column are initial the
    whole column should disappear. Hiding is not enough.
    If this columns is in the middle of the table the following columns should move left to fill the gap.
    my approach: (maybe there is an easier one)
    There are 4 different possible situations. My approach was to create 4 different tables with different amount of
    columns. In the interface I fill the table that is really needed from the source table data and fill a flag that characteristics
    the situation, possible values (1,2,3,4).
    In the form I'd like to print the appropriate table depending on the situations.
    my problem:
    How to place all 4 possible tables lying upon each other in the form and print only the needed one depending on the flag value?
    my question:
    Is my approach ok? Or is there an easier one?
    If it is ok. How can I solve the problem regarding printing the right table.
    Thanks in advance!
    Heinz

    Hi Heinz,
    You can handle it with FormCalc Script at initialization.
    Suppose you have a table with name TABLE having a header HEADER and data row DATA:
    TABLE-->HEADER(Cell1...Cell2...Cell3...Cell4)
              --->DATA(Cell1...Cell2...Cell3...Cell4)
    Suppose you want to hide Cell3 for null values, then write below code at initialization of DATA:
    if(DATA[*].Cell3.rawValue eq null)
    then
    DATA[*].Cell3.presence = "hidden"
    HEADER.Cell3.presence = "hidden"
    else
    DATA[*].Cell3.presence = "visible"
    HEADER.Cell3.presence = "visible"
    endif
    Hope it would help.
    Regards,
    Vaibhav

  • How to create a table with more tan 20 columns

    I created a A4 landscape document to make a calendar for the next year.
    To add the date information I need to insert a table with 32 columns (name of month + 31 days). It should be possible to create a table with a over all width of 29.7 cm (consisting of 1 column of 4.9 cm and 31 columns with 0.8 cm)?
    Remark: Yet reduced all indention's (? German: Einzug) and other spacers and the size of used font of the table.

    Hello Till,
    unfortunatly Pages connot create a table with more than 20 columns. This is no question of size or place.
    But you can create two tables, set the most right border of the fist table to "no line" and align the second table (with the other 12 columns) at the right side of the first table. Now you have "one" table with 32 columns.
    I have done this with my driving book (Fahrtenbuch, um es korrekt zu schreiben and it works fine.
    Frank.

  • How to create a table with auto number?

    I want to create a table with a column default to increasing integer. The first thought came up to me is to use sequence. I find in google the following create statement create table etl_stats1 (run_time date,arr_rows int,lid int default nextval('etl_req'));get ORA-04044: procedure, function, package, or type is not allowed here.
    There are threads metioned using trigger to do the job. But does what not support default to a sequence, it appears such a nature way.

    You need to create a sequence and a trigger:
    SQL> create table etl_stats1 (run_time date,arr_rows int,lid int)
      2  /
    Table created.
    SQL> create sequence etl_seq;
    Sequence created.
    SQL> create or replace
      2    trigger etl_stats1_bir
      3    before insert
      4    on etl_stats1
      5    for each row
      6    begin
      7        select etl_seq.nextval into :new.lid from dual;
      8  end;
      9  /
    Trigger created.
    SQL> insert into etl_stats1 (run_time,arr_rows) values(sysdate,99)
      2  /
    1 row created.
    SQL> select * from etl_stats1
      2  /
    RUN_TIME   ARR_ROWS        LID
    15:38:41         99          1
    SQL> SY.

  • How to create Dynamic Table with more than one column?

    Hi,
    I'm trying to learn Dreamweaver. I'm trying to display 2 units from my database in the same row then I would like go to next row.
    By default DW shows single record in each row. Is it possible to display more than one?
    Thank you

    Of course. You will not name the divs differently, they will all be <div class="RowContainer">  (in the example below) and the reason they will look like
    1 2
    3 4
    5 6
    is because they will "stack themselves up". That is, the first will float to the top left, the next will float up next to it. The third will not fit on the top line floating next to two, so it will start a new row. Four will float up next to it, and five will start the new row.
    Think of the string of divs (don't put wordspaces between them...) as a continuous ribbon or chain of divs. That is a slightly poor analogy, since the second and third won't be next to each other, as a chain or a ribbon might be. But you should be able to have as many divs as you have records... you define the div in the CSS and in your page markup really only show one div.
    Here's a modified example from one of my files:
    <div spry:region="ds1" class="...">
      <div spry:repeat="ds1" class="RowContainer"> <!--this is the div that you would style to float -->
        {category} {title} {medium}<br>
         {price} {sold} {date}<br>
         {sold_to_purchase_price}
      </div>
    </div>
    Beth

  • Can we create JTable with multiple rows with varying number of columns ?

    Hi All,
    I came across a very typical problem related to JTable. My requirement is that cells should be added dynamically to the JTable. I create a JTable with initial size of 1,7 (row, columns) size. Once the 7 columns are filled with data, a new row should be created. But the requirement is, the new row i.e. second row should have only one cell in it initially. The number of cells should increase dynamically as the data is entered. The table is automatically taking the size of its previous row when new row is added. I tried by using setColumnCount() to change the number of columns to '1' for the second row but the same is getting applied to the first row also.
    So can you please help me out in this regard ? Is it possible to create a JTable of uneven size i.e. multiple rows with varying number of columns in each row ?
    Thanks in Advance.

    Well a JTable is always going to paint the same number of columns for each row. Anything is possible if you want to rewrite the JTable UI to do this, but I wouldn't recommend it. (I certainly don't know how to do it).
    A simpler solution might be to override the isCellEditable(...) method of JTable and prevent editing of column 2 until data in column 1 has been entered etc., etc. You may also want to provide a custom renderer that renderers the empty column differently, maybe with a grey color instead of a white color.

  • How to create a table with events in smartforms?

    How to create a table with events view in smartforms?
    It doesn't like general table with header, main area and footer.
    for example:
    in smartforms: LE_SHP_DELNOTE
    table name is TABLEITEM(Delivery items table)

    Vel wrote:
    I am creating XML file using DBMS_XMLGEN package. This XML file will contain data from two different database tables. So I am creating temporary table in the PL/SQL procedure to have the data from these different tables in a single temporary table.
    Please find the below Dynamic SQL statements that i'm using for create the temp table and inserting the data into it.
    Before insert the V_NAME filed, i will be appending a VARCHAR field to the original data.
    EXECUTE IMMEDIATE 'CREATE TABLE TEMP_TABLE (UNIQUE_KEY NUMBER , FILE_NAME VARCHAR2(1000), LAST_DATE DATE)';
    EXECUTE IMMEDIATE 'INSERT INTO TEMP_TABLE values (SEQUENCE.nextval,:1,:2)' USING V_NAME,vLastDate;What exactly i need is to eliminate the INSERT portion of it,Since i have to insert more 90,000 rows into it. Is there way to have the temp table created with data in it along with the sequence value as well.
    I'm using Oracle 10.2.0.4 version.
    Edited by: 903948 on Dec 22, 2011 10:58 PMWhat you need to do to eliminate the INSERT statement is to -- as already suggested by others - eliminate the temporary table. You don't need it. It is just necessary overhead. Please explain why you (apparently) believe that the suggestion of a view will not meet your requirements.

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • HOW TO CREATE A TABLE WITH 800 COLUMNS?

    I have to create a table with 800 columns.I know the create statement to create a table but it will take more time.
    So tell me the other method.

    If you really think that you have to store 800 values for a given entity, it would be a wise idea if you store you information in columnar fashion. Make a main table and a attribute table, keep the primary identifier in the  main table and store other attributes in the attribute table where you can keep the primary key of the first table as foreign key (not necessary) to maintain the relationship.
    eg.
    emp_id
    emp_name
    dob
    city
    state
    country
    pincode
    1
    Mr X
    01/01/1990
    ABC
    ZXC
    MMM
    12345
    Can be stored as
    Main Table
    emp_id
    emp_name
    1
    Mr X
    Attribute Table
    attr_id
    emp_id
    attr_nam
    attr_value
    1
    1
    dob
    01/01/1990
    2
    1
    city
    ABC
    3
    1
    state
    ZXC
    4
    1
    country
    MMM
    5
    1
    pincode
    12345
    Creating table with large number of columns is bad design as suggested by other Gurus.
    Thanks

  • How to create a table with datatype blob and insert a pdf file (ravi)

    how to create a table with datatype blob and insert a pdf file,
    give me the explain asap
    1.create the table?
    2.insert the pdffiles into tables?
    3.how to view the files?
    Thanks & Regards
    ravikumar.k
    Edited by: 895044 on Dec 5, 2011 2:55 AM

    895044 wrote:
    how to create a table with datatype blob and insert a pdf file,
    give me the explain asapPerhaps you should read...
    {message:id=9360002}
    especially point 2.
    We're not just sitting here waiting to answer your question as quickly as possible for you.

  • How to Create Business Partner with  fix number in t-code :BP

    Dear SIr,
    Normally I will set number range for auto  to create Business Partner. In case , If we would like to crea How to Create Business Partner with  fix number in t-code :BP , howe to do?
    Please kindly advise.
    THnak you and best regards,
    Vimol

    Dear Shobhit,
    How to put the thread as you mentioned.
    Best regards,

  • How to create editable table with one empty row ?

    I'm looking for solution how to create editable table with one empty row using ADF BC. I have seen this solution in application that was created in JHeadstart and it's very well idea to use it insead of creation form.

    hammm, i do it this:
    drop the VO on the page, select Table->ADF Table....
    so, drop the botton create, from de VO->operations->create (the firts), and right botton (mouse) Edit binding....
    in Data collection select the VO, in Select an action select CreateInsert
    luck

  • Can I create a table with more than 40 columns ?

    Hello,
    I need to organize my work with a table and need about 66 columns. I am not very good with Numbers but I know a little bit of Pages. I cannot find a way to create a table with more than 40 columns... Is it hopeless ? (Pages '08 v. 3.0.3)
    Thank you all

    It's never too late to try to teach users that the Search feature is not only for helpers.
    The number of columns allowed in Numbers is not a relevant value when the question is about Pages '08 tables.
    I tried to copy a 256 columns Numbers table into a Pages '09 document.
    I didn't got a table but values separated by TABs.
    I tried to convert this text range in a table and got this clear message :
    If I remember well, in Pages '08, the limit is 40 columns.
    It seems that you are a specialist of inaccurate responses, but I'm not a moderator so I'm not allowed to urtge you to double check what you wrote before posting.
    Yvan KOENIG (VALLAURIS, France) vendredi 29 avril 2011 14:57:58
    Please :
    Search for questions similar to your own before submitting them to the community

  • How to create a table with rows within a row?

    Hi,
    I am trying to create a table that looks like this: https://acrobat.com/#d=XyI3rlSWMWYXQixzpRSrXA but I can't figure it out.
    Please can someone tell how I should go about this?
    thanks for the help.

    Hi,
        We you see nested tables, you have to create a table inside a table. For this first you have to merge the rows and insert a table with the number of rows requested. You can find the sample created for you below and let me know in case of any issues
    https://sendnow.acrobat.com/m/g.ashx?i=rO1m-dIDzRs2FibTHDSiww&x=yrC*o4IZIVfpKgqOTbX8OQ
    Thanks

  • How to Create a table with numeric trigger for INSERT

    Let me start off by saying that I am very new to DBMS.
    I need to create a Table with INSERT Trigger. I am not exactly sure if I need to have a BEFORE ot AFTER insert trigger but leanning towards AFTER.
    I have a Java code that will need insert a row each time that piece of code is executed. I would also like an oracle trigger to insert a unique numeric value (REC_ID) for that that record.
    I am totally lost and I am not sure how to go about it. Can you point me to the right direction?
    Basically my table will have the following 3 columns
    REC_ID NUMBER NOT NULL (uniquie value inserted by the trigger)
    PROPERTY_NAME VARCHAR2(100 BYTE)
    PROPERTY_VAL VARCHAR2(100 BYTE)
    Thank you in advance
    Eric

    Take a look at the following: Also please do a search in this forum.
    http://infolab.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html

Maybe you are looking for

  • Macbook Pro + DVI to HDMI cable + HDTV = only 1080i?

    Hi all, I connected my MBP to my TV via a DVI to HDMI conversion cable ($24 from Fry's), but the highest resolution I am getting is 1080i (confirmed on the computer, and the system readout on the TV). Are there other settings that I missed (in the co

  • After installing update 11.0.07, getting overflow error in ibm notes 9.0.1 when trying to delete a mail dokument

    I just upgraded von Adobe Acrobat 10 to 11.0.7, because i wanted to use the pdfmaker in Ibm Notes 9.0.1. But after that every time i try to delete a mail document in my mail-database, i get an overflow error message. Deleting the line with the link t

  • Bugs with styles in RoboHelp 7 ?

    Hello, I'm working with RoboHelp 7 (the french version, good news ! ) for a few days and I note that there are some problems with the styles... I created a new project in RH7 in what I wanted to apply a new style sheet. So I created a new style sheet

  • ICHAT deleted...

    If i deleted Ichat, and i want Leopard, do i have to erase everything and start over? OR can i just install Leopard and will it have the new Ichat on it?

  • Search Option in Webi

    Hello Experts, We are Using Bo 3.1 Version, I made Report through Web-i  but as per my requirement is there any Search Option in Web-i because we dont want to Prefer Report Filter Like we have fileds with info... Country , users, user id , Address an