Sequence number in Trigger

I'm trying to create an insert trigger that will do the following:
1.) Grab the next sequence number from a sequence and use it as the value for the id_number column.
2.) Grab the SYSDATE and use it as the value for the create_date column.
I'm using Oracle 8.1.6 on HP-UX. Here's my syntax, so far:
CREATE OR REPLACE TRIGGER tI_GRANT_TEST_CHILD before INSERT on GRANT_TEST_CHILD for each row
declare curDate DATE;
declare idNumber NUMBER;
begin
     SELECT SYSDATE into curDate FROM DUAL;
     SELECT GRANT_TEST_SEQ.NEXTVAL into idNumber FROM DUAL;
     :new.CREATE_DATE := curDate;
     :new.ID_NUMBER := idNumber;
end;
I'm pretty new to Oracle, so I've probably got a syntax error. The trigger worked fine when I just had the create date functionality; but, I can't get the sequence stuff to work.
Also, anyone know any good links for Oracle syntax standards?
Thanks for the help.

I don't see anything wrong with the syntax in your example, but the trigger can be simplified to:
create or replace trigger ti_grant_test_child
before insert on grant_test_child
for each row
begin
  select grant_test_seq.nextval
    into :new.id_number
    from dual;
  :new.create_date := sysdate;
end;
/You can type SHOW ERRORS after compiling in SQL*Plus to see the actual errors.

Similar Messages

  • Sequence number in pre-insert form trigger

    i have two tables invoice (master) inv_detail(detail) and assign the invoice number using a sequence number,
    by writing the folowing code in the pre-insert trigger
    select a.nextval into :inv_no from dual;
    ( i make the trigger at the form level becuause i have a master (invoice) and detail (inv_detail) relation at the same screen,so i must fetch the value of the
    sequence into the :invo_no in the screen,to let the 'copy value from' property at the detail block works so the value of the foreign key will be copied from
    the sequence number at the screen.
    will this method be a good one for multi user envirment(to select the a.nextval in the pre-insert trigger at the from level?)

    Kevin, thank you for the correct explanation. I was making an assumption and of course it was wrong.
    Mohannad, please do not try to link the invoice count with the sequence number. Any time you need a count, just do a select count(*). The sequence number is ONLY a unique key, and should represent nothing else.
    People have discussed this situation heavily. If you insist on trying to ensure there are no gaps, you will:
    1. Fail -- there are many scenarios where gaps will occur.
    2. Waste your time.
    3. Whatever process you build to try to prevent gaps will cause unnecessary overhead and work for the server, and in a multi-user environment, cause processing bottlenecks due to table locks.

  • How to create Parent and Children is a tree table / trigger sequence number

    How to create Parent and Children is a tree table when the primary key of the parent is generated via a trigger and a sequence number in the database?
    My problem is when I create a parent and then right away a children. The parent still not have a primary key until the transaction get to the database. I get a error when trying the create the children, cannot insert null in the foreign key field of the children.
    Please help.
    Stephane

    You should have the parent key be marked as a DBSequence type.
    Then you should have the association between the master and detail defined as composite association to make sure that the posting order to the database is correct.
    http://download.oracle.com/docs/cd/E24382_01/web.1112/e16182/bcentities.htm#BABFECDJ

  • How to create an INSERT trigger which creates a "sequence number"

    Imagine a table T_Q with columns C_1, C_2, C_3 and UN_123.
    C_1, C_2 and C_3 are all numeric and given by the user.
    UN_123 has to be a calculated sequence number starting by 1 and incremented by 1 for each combination of C_1, C_2 and C_3, i.e., the sequence number depends on the key values C_1, C_2 and C_3.
    Could anybody provide a code sample on how to create a BEFORE INSERT trigger , which calculates the value of the column UN_123 based on the values of C_1, C_2 and C_3 ??
    Premise: Rather than using any sequence, the trigger code should only be based on the table T_Q
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Rainer Wagner ([email protected]):
    Imagine a table T_Q with columns C_1, C_2, C_3 and UN_123.
    C_1, C_2 and C_3 are all numeric and given by the user.
    UN_123 has to be a calculated sequence number starting by 1 and incremented by 1 for each combination of C_1, C_2 and C_3, i.e., the sequence number depends on the key values C_1, C_2 and C_3.
    Could anybody provide a code sample on how to create a BEFORE INSERT trigger , which calculates the value of the column UN_123 based on the values of C_1, C_2 and C_3 ??
    Premise: Rather than using any sequence, the trigger code should only be based on the table T_Q<HR></BLOCKQUOTE>
    null

  • How to populate sequence number automatically in fusion web application

    Hi all,
    I created simple fusion web application.
    I created a form which has programid and remaining fields are there.
    If i press save button program details will save in database.
    here i am giving programid manually. but i need to generate a sequence number to programid automatically.
    If i give program details and save for this program details one sequence number should be generate and save in databasePlease help me
    Thanks,
    raj

    Here there are two methods given
    1. Generating sequence number from the trigger
    2. another one is from java class.
    I tried two but i am not getting the sequence number.
    In my application under model project i have programview.
    i created CustomEntityEmpl java class.
    I double clicked on programid in attributes window, given some sequence name in name field,given db sequence name as as value.
    i mentioned name of sequence in Java class. but still it is asking a value when submiting the program details with out program id.
    please help ASAP
    Thanks
    Nag

  • Sequence number different in DB than from assignSequenceNumber()

    I am using TopLink 10.1.3 DP4 (I think - inside JDev build 3565). I am attempting to use a sequence in a schema that I DO NOT OWN - I cannot make modifications tot he database sequence because there are other applications in place running against it.
    The database sequence is in a 10g database, with an interval of 1 and a cache of 20.
    My object uses the value of the sequence as the sole element of its primary key. I am creating a new object, registering it with a UnitOfWork using registerNewObject(obj). It seems that this does not make a clone, since the object returned by this method is the same identity as the object passed in.
    My project sequencing policy is set as follows:
    <project-sequencing-policy>
    <sequencing-policy>
    <preallocation-size>1</preallocation-size>
    <sequencing-type>Use native sequencing</sequencing-type>
    <name-field-handle>
    <field-handle/>
    </name-field-handle>
    <counter-field-handle>
    <field-handle/>
    </counter-field-handle>
    <sequencing-policy-table></sequencing-policy-table>
    </sequencing-policy>
    </project-sequencing-policy>
    Platform is 10g
    <platform-name>Oracle10g</platform-name>
    The sequence is accessed through a synonym (since JDev couldn't seem to reference a sequence in a different schema from a user's login).
    <sequence-number-name>EVENT_SEQ_SYN</sequence-number-name>
    <uses-sequencing>true</uses-sequencing>
    When I commit my new object, I can see the insert statements in the log claiming a value of 'x' for the primary key. The row in the database actually has a primary key of 'y', where 'x = y - preallocation size' and 'y = sequence last number - preallocation size'. I think I would get the right number if I could set the preallocation size to 0 (performance problems understood) but TopLink chokes on this at run-time.
    Is this problem familiar to anyone?
    Failing using native sequencing, I tried to write custom SQL for the insert statement, but I couldn't find any decent examples anywere on how to do that. I found in a deep google search an example that showed you could use hash (#) to reference the value of a property, but what if the value that needs to be inserted in the database is held in an indirect referenced object? For example, if I was trying to write an insert sql for a Pet object with an indirect reference (valueHolder) to its owner, and I needed to put the owner id in the row - how would I write that insert statement in the 'custom sql' pane in workbench?
    Thanks for your help.
    Dave

    Very strange case.
    I tried to reproduce it using TopLink Employee example - and couldn't.
    Here's the code:
        //  to get debug info
        session.setLogLevel(SessionLog.ALL);
        session.login();
        UnitOfWork uow = session.acquireUnitOfWork();
        Employee emp = new Employee();
        emp.setFirstName("sequencingTest");
        uow.registerNewObject(emp);
        uow.assignSequenceNumber(emp);
        uow.commit();
        System.out.println("firstName = "+emp.getFirstName() +"; id="+ emp.getId());And here's the log:
    [TopLink Info]: 2006.01.26 04:49:05.734--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--TopLink, version: Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060116)
    [TopLink Config]: 2006.01.26 04:49:06.171--DatabaseSessionImpl(18)--Connection(19)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
         platform=>Oracle9Platform
         user name=> "test"
         datasource URL=> "jdbc:oracle:thin:@localhost:1521:orcl"
    [TopLink Config]: 2006.01.26 04:49:10.140--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--Connected: jdbc:oracle:thin:@localhost:1521:orcl
         User: TEST
         Database: Oracle Version: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
         Driver: Oracle JDBC driver Version: 10.1.0.4.0
    [TopLink Finest]: 2006.01.26 04:49:10.625--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequencing connected, state is Preallocation_NoTransaction_State
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence PROJ_SEQ: preallocation size 1
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence ADDRESS_SEQ: preallocation size 1
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence EMP_SEQ: preallocation size 1
    [TopLink Info]: 2006.01.26 04:49:11.453--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])-- login successful
    [TopLink Finer]: 2006.01.26 04:49:11.703--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--acquire unit of work: 48
    [TopLink Finest]: 2006.01.26 04:49:11.703--UnitOfWork(48)--Thread(Thread[main,5,main])--Register the new container bean Employee: sequencingTest
    [TopLink Finest]: 2006.01.26 04:49:11.734--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--Execute query ValueReadQuery()
    [TopLink Fine]: 2006.01.26 04:49:11.750--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--SELECT EMP_SEQ.NEXTVAL FROM DUAL
    [TopLink Finest]: 2006.01.26 04:49:12.328--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequencing preallocation for EMP_SEQ: objects: 1 , first: 3,469, last: 3,469
    [TopLink Finest]: 2006.01.26 04:49:12.328--UnitOfWork(48)--Thread(Thread[main,5,main])--assign sequence to the object (3,469 -> Employee: sequencingTest )
    [TopLink Finer]: 2006.01.26 04:49:12.328--UnitOfWork(48)--Thread(Thread[main,5,main])--begin unit of work commit
    [TopLink Finer]: 2006.01.26 04:49:12.421--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--begin transaction
    [TopLink Finest]: 2006.01.26 04:49:12.437--UnitOfWork(48)--Thread(Thread[main,5,main])--Execute query InsertObjectQuery(Employee: sequencingTest )
    [TopLink Finest]: 2006.01.26 04:49:12.625--UnitOfWork(48)--Thread(Thread[main,5,main])--Assign return row DatabaseRecord(
         EMPLOYEE.VERSION => 1)
    [TopLink Fine]: 2006.01.26 04:49:12.625--UnitOfWork(48)--Connection(39)--Thread(Thread[main,5,main])--INSERT INTO EMPLOYEE (EMP_ID, L_NAME, F_NAME, GENDER, END_DATE, START_DATE, MANAGER_ID, START_TIME, END_TIME, ADDR_ID, VERSION) VALUES (3469, NULL, 'sequencingTest', NULL, NULL, NULL, NULL, {t '09:00:00'}, {t '17:00:00'}, NULL, 1)
    [TopLink Fine]: 2006.01.26 04:49:12.640--UnitOfWork(48)--Connection(39)--Thread(Thread[main,5,main])--INSERT INTO SALARY (SALARY, EMP_ID) VALUES (0, 3469)
    [TopLink Finer]: 2006.01.26 04:49:12.781--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--commit transaction
    [TopLink Finer]: 2006.01.26 04:49:12.796--UnitOfWork(48)--Thread(Thread[main,5,main])--end unit of work commit
    [TopLink Finer]: 2006.01.26 04:49:12.796--UnitOfWork(48)--Thread(Thread[main,5,main])--release unit of work
    firstName = sequencingTest; id=3469
    If I understood correctly, the problem is x showing up in insert as a value to be assigned to PK and y actually inserted into the db. If that's the case could there be a BeforeInsert trigger on the table? To test try inserting through jdbc using concrete pk value.

  • A sequence number error in a form

    I am currently creating a form with a sequence number in forms 10g
    <pre>
    table name: emp
    table desc: emp_id number,emp_name varchar2(20),emp_no number
    </pre>
    i have to generate the emp_id automatically.
    <pre>
    create sequence emp_seq
    minvalue 1
    start with 1
    increment by 1
    cache 20
    </pre>
    I use pre_insert trigger in block
    <pre>
    begin
    select emp_seq.nextval into :emp.emp_id from dual
    end
    </pre>
    problem;
    I can not insert a record because of sequence number in :emp.emp_id
    no compilation error but there is no automatic sequence number appeared in :emp.emp_id after run a form.
    It used to work before(fine with automatic sequence number in :emp.emp_id).
    it happens after I changed layout format and someone add more columns in emp table.
    eventhough i did not use sequence number in emp.emp_id
    in pre-insert-trigger
    <pre>
    begin
    select nvl(max(emp_id),0)+1
    into :emp.emp_id
    from emp;
    </pre>
    still can not show up any number in :emp.emp_id
    please help me out

    Thank you . It works now.
    would you mind explain to me; what I can not use automatic sequence number in emp.empid text field in pre-insert-trigger in my case
    is it trigger confliction in my forms?

  • Sequence number in ADF FORM.

    hi All,
    I have a table with ID as primary key and have a sequence created for this primary key and have a trigger for generating sequence number while inserting the record in table.
    How can i map this Sequence in ADF so while inserting record from Form i can skip the ID column.
    Regards,
    Suresh kumar

    I am using MySQL and primary key is auto incremented in my table. Therefore I have selected
    SQL Plateform     :     SQL92     
    Data Type Map     :     Java
    When I am trying to create entiry object, I do not get option of selecting DBSequence. I did some documents reading, I found out that DBSequence is part of "*Java Extended for Oracle*" Data type Map.
    While creating the EO , in the Attribute Settings, I click the Browse and search for DBSequence. I found out oracle.jbo.domain.DBSeqence.
    Can someone please let me know that I am going to face any problem in future by using DBSequence in his manner?
    Thanks in Advance.

  • File name generation with sequence number

    Hi All,
    My scenario is, File to File.  I need to generate the filenames at the target side like File1.xml, File2.xml..File9999.xml for each file triggered from source system. The interface tiggesrs multiple times in a day.
    For example, for the first time, 5 files triggered, need to generate File1.xml,File2.xml..File5.xml. After some time the interface might trigger with 10 files, then need to generate files as File6.xml,File7.xml....File15.xml . Once the file count reaches 9999 then need to generate the files from  1 (File1.xml)again.
    Could you please suggest me the possible solutions. For this any Lookups required?
    Regards,
    Praveen Kumar

    Hi Praveen,
    Case 1: If a field in source data carries the information regarding the sequence.
                 You can map this value ( Directly .. or using some transformation ) in some temporary field in the target and then use a Variable substitution at the receiver communication channel.
    Case 2. If the source file name carries the sequence information. then you can enable the Adapter specific settings in the Sender communication channel , and then get the information of the source file name using the Container object in the mapping. Then assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    Case 3 : If Case 1 and Case 2 are not applicable ... then you have to use a  Ztable  to store the sequence number , a function module to fetch the number , and then use a UDF  in which you will implement the  RFC call logic.Then the same process ....      assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    BR,
    Sushil.

  • Using sequence in insert trigger?

    Hi all,
    I'm new to this forum, and for that matter, any forums related to computers.
    I would appreciate it if anyone would give me some hinters.
    I created a table with an ID column of type "Number." And I want to populate that column with a sequence number everytime I insert into that table.
    I have a sequence named "sequence1_account."
    Below is my insert trigger code:
    create TRIGGER system.trigger1_account
    BEFORE INSERT ON system.table_account
    for each row
    BEGIN
    :new.id := sequence1_account.NextVal;
    END;
    Note:
    user is "system"
    table is "table_account"
    The error that I get when I try to compile this is
    PLS-00357: Table,View Or Sequence reference 'SEQUENCE1_ACCOUNT.NEXTVAL' not allowed in this context
    So, does that mean I cannot use a sequence in a trigger?
    Thanks in advance!
    in His love,
    HS

    Hello,
    Hoping for some help with sequence triggers as well.
    CREATE TRIGGER "SCALS"."TRIGGER_CALL_NUM"
    BEFORE INSERT ON "CALLLOG" FOR EACH ROW
    BEGIN
    select num_callers.NextVal into : new.callernumber from dual;
    END;
    Problem is that the trigger status is invalid ??
    The error I get is in German (German installation)
    Zeilen-# = 0 Spalten-# = 0 Fehlertext = PLS-00801: internal error [ph2csql_strdef_to_diana:bind]
    Zeilen-# = 2 Spalten-# = 57 Fehlertext = PL/SQL: ORA-06544: PL/SQL: internal error, arguments: [ph2csql_strdef_to_diana:bind], [], [], [], [], [], [], []
    Zeilen-# = 2 Spalten-# = 1 Fehlertext = PL/SQL: SQL Statement ignored
    But perhaps something looks familiar???

  • Generating Sequence Number

    Hi,
    I have created a Query form. I had displayed the sequence number of the record displayed by selecting rownum from the table.
    Now I have added a order by clause in the query. So the rownum is not displayed in the order.
    I have created a small procedure to generate the sequence number.
    I would like to know from which trigger I should call this procedure.
    procedure resequence is
    v_cursor_record number;
    v_position number;
    begin
    v_cursor_record := to_number(:system.cursor_record);
    v_position := v_cursor_record;
    loop
    :detail.item := v_position;
    v_position := v_position + 1;
    exit when :system.last_record = 'TRUE';
    Next_record;
    end loop;
    go_record(v_cursor_record);
    end;

    Thanks for your reply. I have tried this method.It assigns value only for the first record in the block. As the post query trigger is not passing the control to other items ,though more than 10 records are fetched the sequence is generated only for the first record.
    Any other method to achieve this?

  • Sequence Number

    HI guyz,
    I have one problem with my forms. i would like to create Seqeunce number in my field by using when button pressed trigger which shows next next sequence number. how can i do this?
    Regards

    Whats your usage for that number you want to generate from a sequence? If your requirement is to have no gap between the numbers, theree will fail using a sequence (what happens if the user closes forms after pressing your button).
    The easiest way to generate the number only once yor a new record would be to do it "automatically", either in the WEHN-CREATE-RECORD-trigger or using a Initial value of :SEQUENCE.MYSEQ.NEXTVAL (this will fill the field at record creation) or using a PRE-INSERT-trigger (this will fill the field at "commit"-time).
    If you want to keep with the button-method, why not just check if the field is empty (or is it allowed to overwrite existing number?)

  • How to execute a same sequence number for the resulting dynamic rows

    Hi friends,
    I have a sequence and trigger(which will fire id for each and every row insert).
    My scenario is, If i update more than 5 rows at a time means, i need to set a same sequence number example(1) for all the 5 rows.
    Next time, if i update another 5 rows means, then i need to set a same sequence number (i.e) 2 for the next 5 rows.
    So, my updation will be dynamic(may be 2 ,5, 10 rows at a time), But i need to set a same sequence number for one of the column for all the rows that i update.
    Next time, if i update another set of rows means, then i need to set only the next sequence number(i.e) 2(assume that previously updated sequence for the before set of rows is 1) for another set of rows.
    Like that sequence has to update in a sequential manner for more than one set of rows in that column.
    How to achieve it friends.
    example
    id-----------------name
    1-------------------A
    1-------------------B
    1-------------------C
    1-------------------D
    1-------------------E
    2-------------------D
    2-------------------E
    2-------------------F
    2-------------------G
    3-------------------H
    3-------------------IBrgds,
    Mini

    Hi,
    You forgot to mention your version.
    If you want a trigger based solution, then in 10g you need two triggers
    1. A statement level trigger that takes sequence.nextval into a dummy variable that will not be used.
    2. A for each row trigger that uses sequence.currval.
    In 11g you should be able to write a single, composite trigger.
    If you want a solution with no triggers, it could look something like
    SQL> create sequence s start with 10;
    Sequence created.
    SQL>
    SQL> create or replace function s_wrapped
      2  return number
      3  as
      4     v number;
      5  begin
      6     select s.nextval
      7     into v
      8     from dual;
      9
    10     return v;
    11  end s_wrapped;
    12  /
    Function created.
    SQL> create table tab1 as (Select level x, cast(null as number) y from dual connect by level <= 5);
    Table created.
    SQL> update tab1
      2    set y = (select s_wrapped from dual)
      3   where x <= 3;
    3 rows updated.
    SQL> commit
      2  /
    Commit complete.
    SQL> select *from tab1
      2  /
           X          Y
           1         10
           2         10
           3         10
           4
           5
    SQL>Regards
    Peter

  • Re-sequence number problem

    hi all
    i created two text items in form one for sequence number and other for non sequence, i want when i add 01 in non sequence item-text so the sequence number does not change and it should remain the same? is it possible plz help me out thanks in advance.
    sarah
    Edited by: SarahSarahSarah on Aug 30, 2009 12:37 AM

    here is the code:
    on key-commit trigger
    begin
    if
    :ins1.EDNO is null
    then
    SELECT sarahseq.NEXTVAL INTO :ins1.serial FROM DUAL;
    end if;
    :ins1.branch1 := :ins1.branch;
    :ins1.class1 := :ins1.class;
    :ins1.year1 := :ins1.year;
    :ins1.serial1 := :ins1.serial;
    :ins1.cno1 := :ins1.cno;
    :ins1.edno1 := :ins1.edno;
    :global.data := :branch || ' ' || :class || ' ' || :year || ' ' || :serial || ' ' || :cno || ' ' || :edno;
    commit_form;
    call_form ( 'c:\temp\plate no.fmx', no_hide, no_replace, no_query_only );
    END;
    sarah

  • How can we generate auto Sequence Number in DFF attribute

    Dear
    We are on r12,rignt now we have an issue to generate sequence number in site Level(DFF) on Supplier window,actully we want
    to generate sequence number on site leve while inserting new record on site level,so how could i achvie this or any way which can help us.
    --thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    You can consider writing a before-insert trigger.
    The trigger generates the next value of the sequence and makes :new.attributen = the sequence value.
    Hope this helps,
    Sandeep Gandhi

Maybe you are looking for

  • Calling a java application from another

    Hello, i have noticed a strange behaviour of my java app when i open it from another java app. When i run the core application with a bat file using jre1.6 everything works fine. Now what i want to do is create an application that checks the existanc

  • Updating Studio MX 2004 from Flash mx 2004?

    Hi Guys, just wondering if anyone knows an answer to the following. I've got myself an update version of studio mx 2004 with flash pro (with a view to updating to CS3 web premium). My problem is this, will it update from flash mx 2004 standard or do

  • Camera Serial Number for Nikon D80?

    I've seen multiple references to sorting by camera serial number, and I've searched for info on how this info is incorporated into Lr 2.0, but so far I'm still in the dark. My system (Win XP SP3) doesn't incorporate serial number from my D80 when I i

  • Creating a dynamic flow chart

    Hello, I'm new to Flex (just downloaded the FB3). I need to create a web interface which displays a flow chart. New nodes (actions, decisions) may be added or deleted. Any hints on how to do this? Thanks, Zohar.

  • Updating JTable From List

    hi all i am having trouble updating a jtable from a list. the table is declared as follows //TableTracks.java String[] columnNames = {"Track Number",   "Mute",   "File/Track Name",   "Number of Loops", Object[][] data = { {"1", "0", "", "1" , }, {"2"