Need help in deleting multiple tables

Hi,
In one of my scenario i want to delete One record from the table, but there are some child and sub child exist for the table. And the on delete cascade is not set fro any of the table.
Structure of my table,
Table-1
tab1_pk
tab1_name
Table-2
tab2_pk
tab1_pk
Table-3
tab3_pk
tab2_pk
i want to delete the record from Table-1 and all the related record of Table-2 and Table-3 in a single query.
Plz help

Dear 786725,
What has just came to my mind at first sight is that you can create a trigger for your approach. I don't think that a single query will delete some rows from more than one table.
Please go to the http://tahiti.oracle.com , select your database version and search for the after trigger. Hint: You may need to use the FOR EACH ROW clause and you again may need to use :old :new parameters in the trigger to have the information of what has just been deleted from the relevant table.
Hope That Helps.
Ogan
Edited by: Ogan Ozdogan on 05.Ağu.2010 19:00
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#SQLRF01405
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b31695/dialogs.htm#sthref454
4.24 Create Trigger
The following information applies to a trigger, which is which is a stored PL/SQL block associated with a table, a schema, or the database, or an anonymous PL/SQL block or a call to a procedure implemented in PL/SQL or Java. The trigger is automatically executed when the specified conditions occur.
Schema: Database schema in which to create the trigger.
Name: Name of the trigger. Must be unique within the database.
Add New Source in Lowercase: If this option is checked, new text is entered in lowercase regardless of the case in which you type it. This option affects only the appearance of the code, because PL/SQL is not case sensitive in its execution.
Trigger tab
Trigger Type: The type of object on which to create the trigger: TABLE, VIEW, SCHEMA, or DATABASE. (The remaining items depend on the type of trigger.)
Table Owner or View Owner: For a trigger on a table or a view, the name of the owner of the table or the view.
Table Name or View Name : For a trigger on a table or a view, the name of the table or the view.
Before or After: For a trigger on a table, select Before to cause the database to fire the trigger before executing the triggering event, or select After to cause the database to fire the trigger after executing the triggering event.
Statement Level or Row Level: For a trigger on a table, Statement Level fires the trigger once before or after the triggering statement that meets the optional trigger constraint defined in the WHEN condition; Row Level fires the trigger once for each row that is affected by the triggering statement and that meets the optional trigger constraint defined in the WHEN condition.
Insert, Update, Delete: For a trigger on a table or a view, Insert fires the trigger whenever an INSERT statement adds a row to a table or adds an element to a nested table; Update fires fire the trigger whenever an UPDATE statement changes a value in one of the columns specified in Selected Columns (or in any column if no columns are specified); Delete fires the trigger whenever a DELETE statement removes a row from the table or removes an element from a nested table.
Referencing - Old: For a trigger on a table, the correlation names in the PL/SQL block and WHEN condition of a row trigger to refer specifically to old value of the current row.
Referencing - New: For a trigger on a table, the correlation names in the PL/SQL block and WHEN condition of a row trigger to refer specifically to new value of the current row.
Available Columns: For a trigger on a table, lists the columns from which you can select for use in an Update trigger definition.
Selected Columns: For a trigger on a table, lists the columns used in an Update trigger definition.
When: For a trigger on a table, an optional trigger condition, which is a SQL condition that must be satisfied for the database to fire the trigger. This condition must contain correlation names and cannot contain a query.
Schema: For a trigger on a schema, the name of the schema on which to create the trigger.
Available Events: For a trigger on a schema or database, lists events from which you can select for use in the trigger definition.
Selected Events: For a trigger on a schema or database, lists events used in the trigger definition.
DDL tab
This tab contains a read-only display of a SQL statement that reflects the current definition of the trigger.
"

Similar Messages

  • Need Help on Joining multiple tables in Golden Gate

    Hi,
    Can you please help me with some examples on joining multiple tables in Golden Gate. i.e, my requirement is to Join Table 1 & Table 2 in Source and Load it in Target with 10 fields from Table 1 & 5 fields from Table 2 based on the join condition between Table 1.key = Table2.key
    I have been trying to do that using SQLEXEC command in Golden Gate. But, is there a way I can do this in the Extract parameter file?
    Thanks for your time
    Regards
    Suresh

    Hi,
    Thanks a lot for the prompt reply. I am able to do that for the below scenario
    Source.T1.Field1
    Source.T1.Field2
    Source.T2.Field1
    Source.T2.Field2
    Target Table
    T1.Field1, T1.Field2, T2.Field1, T2.Field2.
    But, if I already have T2.Field1 in T1 table, then T1.Field1 takes the precendence and getting loaded. i.e., I wanted to join the table 1 & Table 2 and based on the matching condition, I will need to populate the data either from T1 or T2.
    Hope you got my requirement.
    Below the Data Dump file & Replicat File.
    EXTRACT dpump
    USERID ********, PASSWORD ********
    RMTHOST *******, MGRPORT 7809
    RMTTRAIL /oracle/gg/dirdat/rt
    --PASSTHRU
    TABLE TABLE1,
    SQLEXEC (ID LOOKUP,
    QUERY "SELECT FIELD1 FROM SOURCE.TABLE2 WHERE FIELD1 = :v_field1",
    PARAMS ( v_field1 = field1 )),
    TOKENS (tk_field_1 = @GETVAL (lookup.field1));
    Replicat file
    REPLICAT repjoin
    ASSUMETARGETDEFS
    HANDLECOLLISIONS
    USERID *******, PASSWORD ********
    MAP SOURCE.T1, TARGET TARGET.GG_TABLE_T1,
    COLMAP ( USEDEFAULTS ,
    field1 = @token ("tk_party_id"));
    I eventually wanted to join like below.
    select t1.field1, t1.field2, t2.field1 from t1, t2
    where t1.field1 = t2.field1;
    Thanks for your time again
    Regards
    Suresh

  • Need help in creating multiple signature forms?

    need help in creating multiple signature forms that can be digitally signed in adobe reader

    Automator gets a bit unweildy when trying to vary things outside of what the actions provide.  Since you are already using an AppeScript in your workflow, might as well do the whole thing:
    set baseFolder to (path to desktop) -- the location to create the folder
    display dialog "Please provide a new folder name:" default answer "test"
    set folderName to text returned of the result
    repeat -- keep repeating until a number is returned
      display dialog "How many subfolders?" default answer "5"
      set theNumber to text returned of the result
        try -- test the result
          set theNumber to theNumber as integer
          exit repeat -- success
        end try
    end repeat
    tell application "Finder"
      try -- make new folder
        set newFolder to (make new folder at baseFolder with properties {name:folderName})
      on error number -48 -- skip errors if the folder is already there
        set newFolder to ((baseFolder as text) & folderName) as alias
      end try
      repeat with X from 1 to theNumber
        try -- make new subfolder
          make new folder at newFolder with properties {name:folderName & X}
        on error number -48 -- skip errors if the folder is already there
        end try
      end repeat
    end tell

  • Need help Setting up Multiple Static Ip , 1 for each port of the fios router

    Need help Setting up multiple Static Ip on my fios router
    I have been trying to figure out how to set up multiple ip in my fios router.
    However I kind of managed how to set up multiple static ip However the way I want it is for each port of my router to have an external ip signed to it. ( like 4 different modem in 1 )
    Verizon gave me 5 static ip but they can not help me how to set it up.
    Have anyone here done more then one static ip on different ports? I assume that the process will be the after the second static ip.

    You want to set up Static Nat. You will not assign the IP to a port, but rather to a local machine. Figure out what machines you want your IP's to go to. Under the firewall section you will see static nat. Pick the machine you want and enter one of the IP's you were assigned.

  • Transaction handling in the deleting multiple tables.

    Hi 
    I have a process to delete data from multiple tables. When we delete a specific table, do we get into
    any locking issues on the other tables, as the complete logic is in the
    TRANSACTION block, but only one "IF" condition will be executed at any time.
    Is this good, or Do I need to break each "DELETE Table Tx" to a separate procedure?
    ---Example is below with wrapper and called SP sample syntax.
    CREATE PROC Proc1
    AS
    BEGIN
    EXEC Proc2 'T1', 'Date1'
    EXEC Proc2 'T2', 'Date1'
    EXEC Proc2 'T3', 'Date1'
    END 
    GO
    CREATE PROC Proc2 (@Table_name VARCHAR(10), @Date DATETIME)
    AS
    Begin
    BEGIN TRY
    BEGIN TRAN T1
    IF @Table_name  = T1
    BEGIN
    DELETE from T1 where t1.Datex <= @Date
    END
    IF @Table_name  = T2
    BEGIN
    DELETE from T2 where t2.Datet2 <= @Date
    END
    IF @Table_name  = T3
    BEGIN
    DELETE from T3 where t3.Datet3 <= @Date
    END
    COMMIT TRAN T1
    END TRY
    BEGIN CATCH
    --On error 
    ROLLBACK Tran T1
    END CATCH
    END
    THanks,
    Krishna

    Kris_DB_Architect,
    Why are you using multiple IFs. Just use this:
    ALTER PROC Krishna_Forum @TableName VARCHAR(100),@BranchID INT
    AS
    DECLARE @SQLStmt VARCHAR(500)
    SET @SQLStmt='DELETE '+@TableName +' WHERE BranchID='+CONVERT(VARCHAR(2),@BranchID)
    EXEC (@SQLStmt)
    EXEC Krishna_Forum 'AccBanalce',1
    I have used your object only as described in another thread created by you. I hope this would be easily understandable.
    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

  • Help with deleting multiple strings from file.......

    I am trying to delete the same string that may appear multiple times in the file. Here is the output to the screen. Here is the code. I have been researching the delete method it says that I have to start at an index position in the string but how would I find out where the multiples strings reside in the file? I am getting the feeling that it won't work for my purpose..???? I am trying to delete all ot the strings "a string of data3" from the file.
    Output
    C:\TestRead>java StringDelete
    Temp String file_data-------- a string of data3a string of data2a string of data
    1a string of data3a string of data2a string of data1a string of data3
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    String toDelete-------- a string of data3
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    String toDelete-------- a string of data2
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    String toDelete-------- a string of data1
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    String toDelete-------- a string of data3
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    String toDelete-------- a string of data2
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    String toDelete-------- a string of data1
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    String toDelete-------- a string of data3
    Just A Blank Line
    Just A Blank Line
    Just A Blank Line
    Code:
    import java.io.*;
    public class StringDelete
    public static void main(String [] args)
    try
    FileInputStream fis = new FileInputStream("TestFile.txt");
    DataInputStream in = new DataInputStream(fis);
    StringBuffer file_data = new StringBuffer();
    while(in.available() > 0)
    String temp = in.readUTF(); // read in a string from the file
    file_data.append(temp); // append it to the buffer
    System.out.println("Temp String file_data-------- " + file_data);
    System.out.println("Just A Blank Line");
    System.out.println("Just A Blank Line");
    System.out.println("Just A Blank Line");
    boolean keepGoing = true;
    while(keepGoing)
    String toDelete = file_data.substring(0, "a string of data3".length());
    System.out.println("String toDelete-------- " + toDelete);
    System.out.println("Just A Blank Line");
    System.out.println("Just A Blank Line");
    System.out.println("Just A Blank Line");
    if(toDelete == null || toDelete.equals("") )
    keepGoing = false;
    else
    file_data.delete(0,"a string of data3".length());
    catch(IOException e)
    e.printStackTrace();

    Here is the output. I am trying to get each part to work before I go on to the next part that is why some code is commented out.
    I need help to know why string "a string of data3" is not deleted in the towrite string??
    Output:
    C:\TestRead>java NewStringDelete
    String v after remove [ &#9668;a string of data3 &#9668;a string of data2 &#9668;a string of data1
    &#9668;a string of data3 &#9668;a string of data2 &#9668;a string of data1 &#9668;a string of data3]
    String towrite after remove &#9668;a string of data3 &#9668;a string of data2 &#9668;a string of
    data1 &#9668;a string of data3 &#9668;a string of data2 &#9668;a string of data1 &#9668;a string of data
    3
    Code:
    import java.util.Vector;
    import java.io.*;
    public class NewStringDelete
         public static void main(String [] args)
              //String ls = System.getProperty("line.separator");
              //File file;
              Vector v=new Vector();
         try{
              BufferedReader br=new BufferedReader(new FileReader ("TestFile.txt"));
              String s;
              while ((s=br.readLine())!=null)
                   {v.addElement(new String(""+s));}
                        br.close();
         catch(IOException e)
                   e.printStackTrace();
    /*now you have a Vector containing String objects..*/
         String remove = ("a string of data3");
         String towrite="";
    System.out.println("String v after remove " + v);     
         for (int i=0; i<v.size();i++)
              String ss = (String)v.elementAt(i);
              if (ss.equalsIgnoreCase(remove)){continue;}
              //     towrite=towrite+ss+ls;
                   towrite=towrite+ss;
    System.out.println("");               
    System.out.println("");               
    System.out.println("String towrite after remove " + towrite);                    
    /*do filewrite*/
    //try{
    // FileWriter fw=new FileWriter(TestFile.txt);
    // fw.write(towrite);
    // fw.close();
    // catch(IOException e)
    //               e.printStackTrace();

  • Need help in creating multivalued table

    hi all,
    please i need help how to create a table with a column that require to have many cells in each cell of each record.
    plz help me with the datatype and the sql syntax.
    thanks

    you mean nested tables?
    Examples are here
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2139603
    Sybrand Bakker
    Senior Oracle DBA

  • Need help in Creating External Tables

    Hi All,
    I have a flat file containing numberic data, CLOB data, and also date columns data. I have to load this flat file data into staging server table using External tables. I have to write a stored procedure in such way creating exteranl tables dynamically. My question or need help from you people is that how to define the external table to load the CLOB data from flat file.
    Thanks,
    Sankar

    The LOCATION clause of an external table specifies the file or files to be read when the table is queried. You can change it to refer to different files without dropping and recreating the table and invalidating all dependent code.
    Regarding DBMS_SQL, yes you can do it the hard way if you prefer.
    Good point about CLOB columns in external tables. Quite possibly they are not supported, but I would have to check the manuals and try some examples.

  • Need help with global temporary table

    Can anyone please help, the following line of code :
    CREATE GLOBAL TEMPORARY TABLE tbl_bulknodes_temp ( obt_uuid VARCHAR2 ) ON COMMIT DELETE ROWS
    Yeilds the following error both in PL/SQL and running it in SQL PLUS
    Error starting at line 1 in command:
    CREATE GLOBAL TEMPORARY TABLE tbl_bulknodes_temp ( obt_uuid VARCHAR2 ) ON COMMIT DELETE ROWS
    Error report:
    SQL Error: ORA-00906: missing left parenthesis

    Hi,
    You have to put length to varchar2 column...
    SQL> CREATE GLOBAL TEMPORARY TABLE tbl_bulknodes_temp ( obt_uuid VARCHAR2(30) ) ON COMMIT DELETE ROWS;
    Table created
    SQL> CREATE GLOBAL TEMPORARY TABLE tbl_bulknodes_temp2 ( obt_uuid VARCHAR2 ) ON COMMIT DELETE ROWS;
    CREATE GLOBAL TEMPORARY TABLE tbl_bulknodes_temp2 ( obt_uuid VARCHAR2 ) ON COMMIT DELETE ROWS
    ORA-00906: missing left parenthesis
    SQL> Regards,

  • VBA needs to pull from multiple tables, how to code for best efficiency?

    I have one main table, and three other tables that exist in a one to many relationship off of the main table.
    I need data from all 3 tables for my calculation. I'll iteratively run through the recordsets of each of these tables for the record on the main table, to perform my calculation.
    Now I need to run this calculation for each record on the main table. I see two options:
    1. Query the three tables for relevant records, for each individual record on the master table. I suspect this approach would be computationally inefficient.
    2. Create additional logic within my calculation to limit the recordset movement to just the record at hand. I can no longer use end of field, or move first type properties/methods, so this will add a good bit of complexity to already complex code.
    I'll need to run this monthly for approx 3000-5000 records.

    Since you can't include multiple independent 1-many relationships in a single query, I only see two choices.
    You can open a recordset for each of the four tables sorted by the main table's primary key. Use an outer loop to move through the main table row by row. Within that loop you loop on each of the child tables using the condition While child.Fields("FK")
    = parent.Fields("PK").
    Another approach is to define a querydef for each of the child tables including a parameter for the foreign key value. Then within the outer loop you assign the parameter and open a recordset from each of the child querydefs. You're still querying the
    database 3 times for each iteration of the parent table, but I think it saves some time to be able to reuse the querydef instead of creating a new one each time.
    I think either approach should be fast enough for 3-5,000 records done monthly.
    Paul

  • Need Help to delet sort key! Please help!

    Hi,
    I have a problem in the following program.
    Source Code:
    t-belnr  = bsid-zuonr.
    SPLIT t-belnr at '#' into wk_belnr wk_x_belnr.
    CLEAR t-belnr.
        t-belnr  = wk_belnr.
        t-xblnr  = bsid-belnr.
        IF t-belnr NE space.
          s-belnr      = t-belnr.
        ELSE.
          t-belnr      = t-xblnr.
          s-belnr      = t-xblnr.
        ENDIF.
    IF t-xblnr NE space.                                    "WD041005a
          s-xblnr      = t-xblnr.                               "WD041005a
        ELSE.                                                   "WD041005a
          s-xblnr      = t-belnr.                               "WD041005a
        ENDIF.                                                  "WD041005a
        WHILE s-xblnr(1) EQ '0'.                            "INS MG130606
          SHIFT s-xblnr LEFT.                               "INS MG130606
        ENDWHILE.                                "INS MG130606
    In the final ALV.
    If first colum (t-zuonr) (sort key for the document )is blank, the document need to be deleted.
    Question:
    How can I write the code to deleted the t-zuonr when it is space?
    Please help!!!
    Thank you!!

    Try as below:
    DELETE <itab> WHERE <fld> IS INITIAL.
    i.e
    DELETE t WHERE zuonr IS INITIAL.
    Kind Regards
    Eswar

  • Please Help! Deleting multiple record by using checkbox selected

    Hello everybody,
    I am a new to JSP. I really don't know how to delete multiple record by using checkbox selected and pressing submit button.
    For example, deleting webmailbox letters using checkbox selected and delete button. The mail we checked will delete from the inbox.
    I like to use my user account deleting system of my project like above example.
    How can I do in JSP? I will very please you if you share you knowledge and code for me.
    If you have URL address, could you share me for reference?
    Please help me...
    With Thanks and Regards,
    wtdahl

    Take a look at this thread, I thing it answers your question quite good:
    http://forum.java.sun.com/thread.jsp?thread=516658&forum=45&message=2463505

  • Need help on deleting after exporting to IDML

    Hi Forum,
    I have a script to export all the "indesign files" found inside the folder... and then remove all the indesign files...
    Instead, Can i have a help to delete....
    the indesign file after exporting to IDML and then
    continue opening the next indesign file, exporting to IDML and deleting it...
    then continue file3....
    The below is the script open indesign files and export to idml and then remove all the files inside the folder Desktop/GENERAL_CS6-IDML/IN_CS6
    var mySourceFolder = Folder("Desktop/GENERAL_CS6-IDML/IN_CS6");
    var myOutFolder = Folder("Desktop/Completed");
    //var Indd_files = get_Files(mySourceFolder,[], ".indd");
    var Indd_files = mySourceFolder.getFiles (/\.indd|\.INDD/i);
    //var Indd_files = get_Files(mySourceFolder,[], ".indd");
    if(Indd_files.length>0)
        for(var w=0;w<Indd_files.length;w++)
            try{
                 app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
                myDoc = app.open(File(Indd_files[w]));
                 app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
                 var myDocNam = stripExt((Indd_files[w].name).replace(/%20/g," "))+"idml";
                 myDoc.exportFile(ExportFormat.INDESIGN_MARKUP, (File(myOutFolder+"/"+myDocNam)));           
    //          myDoc.save(File(myOutFolder+"/"+myDocNam));
                app.activeDocument.close(SaveOptions.no);
            }catch(E){}
    try {
    var copyFolder1 = Folder("Desktop/GENERAL_CS6-IDML/IN_CS6");
    var myFiles2 = copyFolder1.getFiles(/\.indd|\.INDD/i);
    for ( i = myFiles2.length-1; i >= 0 ; i-- ){
    myFiles2[i].remove();
    } catch (e) {}
    Many thanks for the support..

    I hope this is what you expected.
    You can try the following code:
    var mySourceFolder = Folder("Desktop/GENERAL_CS6-IDML/IN_CS6");
    var myOutFolder = Folder("Desktop/Completed");
    //var Indd_files = get_Files(mySourceFolder,[], ".indd");
    var Indd_files = mySourceFolder.getFiles (/\.indd|\.INDD/i);
    //var Indd_files = get_Files(mySourceFolder,[], ".indd");
    if(Indd_files.length>0)
        for(var w=0;w<Indd_files.length;w++)
            try{
                 app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
                 var myFile = File(Indd_files[w]);
                myDoc = app.open(myFile);
                 app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
                 var myDocNam = stripExt((Indd_files[w].name).replace(/%20/g," "))+"idml";
                 myDoc.exportFile(ExportFormat.INDESIGN_MARKUP, (File(myOutFolder+"/"+myDocNam)));          
                app.activeDocument.close(SaveOptions.no);
                myFile.remove();
            }catch(E){}
    Green4ever

  • Need help putting info in table

    I am new to Dreamweaver. I am trying to make a very basic
    website useing a table. Top section for logo, left for links, and
    the main information in the bigger of the boxes. Anyway, I made the
    table but will not let me put anything in the table. I have the cs2
    version. Can anyone help me out?
    <table width="680" border="1" cellpadding="0"
    cellspacing="2" bgcolor="#33FF99" frame="border">
    <!--DWLayoutTable-->
    <tr>
    <td width="130" height="100"></td>
    <td width="558"></td>
    </tr>
    <tr height="800">
    <td width="130" height="480"></td>
    <td></td>
    </tr>
    </table>

    Show us your code, please.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "moocow870" <[email protected]> wrote in
    message
    news:f1nd1e$btf$[email protected]..
    >I am new to Dreamweaver. I am trying to make a very basic
    website useing a
    > table. Top section for logo, left for links, and the
    main information in
    > the
    > bigger of the boxes. Anyway, I made the table but will
    not let me put
    > anything
    > in the table. I have the cs2 version. Can anyone help me
    out?
    >

  • I Need Help In Deleting Table row by clicking on "Delete" button inside the

    Dear all,
    first i'm new to Swing
    i have created table with customized table model, i fill this table using 2d array, this table rows contains JButtons rendered using ButtonRenderer.java class and action listeners attached by the AbstractButtonEditor.java
    what iam trying to do is when i click on a specified button in table row i want this row to be deleted, i found some examples that uses defaultTableModelRef.removeRow(index), but iam using customized table model and the following is my code
    JTable tblPreview = new JTable();
              DbExpFormTableModel model = new DbExpFormTableModel();               
              tblPreview.setModel(model);
    //adding the edit button          
              tblPreview.getColumn("Edit").setCellRenderer(new ButtonRenderer());
              tblPreview.getColumn("Edit").setCellEditor(new AbstractButtonEditor(new JCheckBox()));
              //adding the delete button
              tblPreview.getColumn("Delete").setCellRenderer(new ButtonRenderer());
              tblPreview.getColumn("Delete").setCellEditor(new AbstractButtonEditor(new JCheckBox()));
    and here is the code of the code of my customized table model ( DbExpFormTableModel )
    public class DbExpFormTableModel extends GeneralTableModel
         public DbExpFormTableModel()
              setColumnsNames();
              fillTable();          
         private void setColumnsNames()
              columnNames = new String [5];
              columnNames[0] = "ID";
              columnNames[1] = "Database ID";
              columnNames[2] = "Prestatement";
              columnNames[3] = "Edit";
              columnNames[4] = "Delete";
         private void fillTable()
              int numOfRows = 2;     // = getNumberOfRows();
              data = new Object[numOfRows][5];          
              data[0][0] = "1"; //we must get this value from the database, it is incremental identity
              data[0][1] = "AAA";
              data[0][2] = "insert into table 1 values(? , ? , ?)";
              data[0][3] = "Edit";
              data[0][4] = "Del";
              data[1][0] = "2"; //we must get this value from the database, it is incremental identity
              data[1][1] = "BBB";
              data[1][2] = "insert into table2 values(? , ? , ? , ?)";
              data[1][3] = "Edit";
              data[1][4] = "Del";
    and this is the GeneralTableModel class
    public class GeneralTableModel extends AbstractTableModel implements Serializable
         public static Object [][] data;
         public static String[] columnNames;
         //these functions should be implemented to fill the grid
         public int getRowCount()
              return data.length;
         public int getColumnCount()
              return columnNames.length;
         public String getColumnName(int col)
    return columnNames[col];
         public Object getValueAt(int row , int col)
              return data[row][col];
         //i've implemented this function to enable events on added buttons
         public boolean isCellEditable(int rowIndex, int columnIndex)
              return true;
         public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    public void setValueAt(Object value, int row, int col)
    //fireTableDataChanged();          
    data[row][col] = value;          
    fireTableCellUpdated(row, col);     
    And Now what i want to do is to delete the clicked row from the table, so please help me...
    thank you in advance

    Hi Sureshkumar,
    1. Create a value attribute named <b>select</b> of type boolean.
    2. Bind the <b>checked property</b> of all the checkboxes to this attribute.
    3. Create an action called <b>click</b> and bind it to <b>OnAction</b> event of the button(whose click will check all the checkboxes) and write this code in that action.
    <b>wdContext.currentContextElement().setSelect(true);</b>
    Warm Regards,
    Murtuza

Maybe you are looking for

  • When trying to convert a pdf file into a word doc, i only get the graphics but not the text. How do i remedy this?

    When trying to convert a pdf file into a word doc I only get graphics but no text. What to do?

  • Set encoding in xml document

    Hi, I create org.dom4j.Document in java and I need set encoding to windows-1250, but I don't know how it do. I have always default encoding UTF-8. Document document = DocumentHelper.createDocument(); Element zakazky = document.addElement(ZAKAZKY); <?

  • Mysterious where clause with japanese

    enviroment: PL/SQL Develope, Version 7.1.0.1337, Windows XP Professional 5.1 Build 2600 (Service Pack 2) Here is the problem, when i add a where clause with japanese, the data evaporated: SQL> select * from ja_test; EXECUTABLE_NAME DESCRIPTION XX00MR

  • Standard function for returninf time difference in days and hours.

    Hello all,             Can somebody tell me whether there exists some standard function module which can calculate the time difference and returns the calculated time in the form of days and hours ? e.g. the time difference between the date 1.12.2007

  • My macbook air is in "safe boot"

    my macbook air recently went into "safe boot" after I had restarted the computer. now it will not let me log on & tells me "incorrect password". i've typed the password in over 30 times, shuting it down & restarting it again.. nothing seems to be wor