Populating JTable table from sql statement.

Trying to teach myself a combanation of things. Since Oracle is my background java to oracle is only a natural. Now this code I'm trying to select some rows and then display those rows in a table. Simple concept as a teaching aid to me. I won't go into what I went through to get this far, just say there have been quite a few fall starts. Now this code works; however it returns ten rows (one for each tablespace) and displays row 1 ten times. Not quite what I had in mind.
I have got a simple select statment in my code:
select tablespace_name,initial_extent,next_extent,pct_increase, status
from dba_tablespaces order by tablespace_name
package TableTest;
// java imports
import java.util.Vector;
import java.awt.event.*;
import java.awt.Toolkit;
import java.awt.*;
import javax.swing.*;
// sql imports
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.Connection;
import java.sql.DriverManager;
public class TableTest extends JFrame
  Connection conn;  // database connection object
  Statement stmt;   // statement object
  ResultSet rslt;   // result set object
  //private vars
  private String userName         = "bubbalouie";
  private String password         = "helpmeimsinking";
  private String sid              = "rob";
  private String port             = "1521";
  private String server           = "w2sd001";
  private String connectString    = "jdbc:oracle:thin:@"+server+":"+port+":"+sid;
  private int numCols             = 5;
  private String sqlStmt          = null;
  private String status           = null;
  public TableTest()
    // Get content pane
    Container contentPane = getContentPane();
    // set layout manager
    contentPane.setLayout(new BorderLayout());
    // create some places to put dat
    Vector data    = new Vector();
    Vector columns = new Vector();
    Vector colHeads = new Vector();
    colHeads.addElement("tablespace name");  // this is ugly fix later
    colHeads.addElement("initial extent");
    colHeads.addElement("next extent");
    colHeads.addElement("pct increase");
    colHeads.addElement("status");
    // construct a simple sql statement
    sqlStmt = "select  tablespace_name, initial_extent, next_extent, pct_increase, status";
    sqlStmt = sqlStmt+" from dba_tablespaces order by tablespace_name";
    try
      // connect to database
      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
      Connection conn = DriverManager.getConnection(connectString, userName, password);
      // select data into object
      stmt = conn.createStatement();
      rslt = stmt.executeQuery(sqlStmt);
      while (rslt.next())
        for ( int i=0; i<numCols; i++ )
          columns.addElement(rslt.getObject(i+1));  // get the i+1 object
        }  // end for
        data.addElement(columns);
      }    // end while
      // create the table
      JTable table = new JTable(data,colHeads);
      // add table to scroll pane
      int v = ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
      int h = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
      JScrollPane jsp = new JScrollPane(table,v,h);
      // Add scroll pane to content pane
      contentPane.add(jsp, BorderLayout.CENTER);
    } catch (SQLException ex)
      String msg = "SQL error: "+ex.toString();
    } catch (Exception ex)
      String msg = "Error: "+ex.toString();
  }                                     // end constructor
  public static void main(String[] args) {
      TableTest frame = new TableTest();
      frame.setSize(500, 400);
      frame.setTitle("TableTest");
      frame.setVisible(true);
}  // TableTest end class

if you are interested here is a generic table model for displaying ResultSets in a JTable. The resultset needs to support calling resultset meta data and the basic methods in there but then it should support anything you give it.
import java.sql.*;
import java.util.*;
import javax.swing.table.*;
public class ResultSetTableModel extends AbstractTableModel{
  Vector rows;          
  int[] types;          
  String[] names;     
  public ResultSetTableModel(ResultSet rs)throws SQLException{
    ResultSetMetaData rsmd = rs.getMetaData();          
    types = new int[rsmd.getColumnCount()];          
    names = new String[rsmd.getColumnCount()];          
    for(int n=0;i<types.length;n++){               
      types[n] = rsmd.getColumnType(n+1);
      names[n] = rsmd.getColumnName(n+1);     
    rows = new Vector();
    while(rs.next()){
      Vector aRow = new Vector();
      for(int j=0;j<types.length;j++){
           switch(types[j]){
          case Types.TINYINT:
            aRow.addElement(new Byte(rs.getByte(j+1)));
            break;
          case Types.SMALLINT:
            aRow.addElement(new Short(rs.getShort(j+1)));
            break;
             case Types.INTEGER:
               aRow.addElement(new Integer(rs.getInt(j+1)));
               break;
             case Types.BIGINT:
               aRow.addElement(new Long(rs.getLong(j+1)));
               break;
             case Types.REAL:
               aRow.addElement(new Float(rs.getFloat(j+1)));
               break;
             case Types.FLOAT:
               aRow.addElement(new Double(rs.getDouble(j+1)));
               break;
             case Types.DOUBLE:
               aRow.addElement(new Double(rs.getDouble(j+1)));
               break; 
             case Types.DECIMAL:
               aRow.addElement(rs.getBigDecimal(j+1));
               break;
             case Types.NUMERIC:
               aRow.addElement(new Long(rs.getLong(j+1)));
               break;
             case Types.BIT:
               aRow.addElement(new Boolean(rs.getBoolean(j+1)));
               break;
             case Types.BINARY:
               aRow.addElement(rs.getBytes(j+1));
               break;
             case Types.DATE:
               aRow.addElement(rs.getDate(j+1));
               break;
             case Types.TIME:
               aRow.addElement(rs.getTime(j+1));
               break;
             case Types.TIMESTAMP:
               aRow.addElement(rs.getTimestamp(j+1));
               break;           
             default:
               aRow.addElement(rs.getString(j+1));
      rows.addElement(aRow);           
  public Class getColumnClass(int column){
    switch(types[column]){
      case Types.BIT:
        return Boolean.class;
      case Types.DATE:
        return java.sql.Date.class;
      case Types.TIME:
        return java.sql.Time.class;
      case Types.TIMESTAMP:
        return java.sql.Timestamp.class;
      default:
        return Object.class;     
  public int getRowCount(){
    return rows.size();     
  public int getColumnCount(){
    return types.length;     
  public Object getValueAt(int row, int column){
    Vector aRow = (Vector) rows.elementAt(row);
    return aRow.elementAt(column);
  public String getColumnName(int column){
    return names[column];
}

Similar Messages

  • Problem in Import of Tables from SQL Server.

    Hi Forum,
    I m new to OWB.
    I m facing a prob regarding the import of tables.
    I m importing tables from SQL server through ODBC DB Link..
    It imports the tables fine, but without key constraints..
    Can u tell me, Why? and How can I import that info as well?

    Hi David,
    The things I said are not a fix for this problem.
    If your RCU installation worked, then you do not have to worry about modifying the createfr.sql.
    Edit:
    I've just tracked the problem. It appears that when using the query builder, BI forgets to add the " sign.
    For example:
    This query will give the hyperion error.
    select     "table"."field"
    from     "database.user"."table"
    To correct it write it like this:
    select     "table"."field"
    from     "database"."user"."table"
    Edited by: EBA on Nov 14, 2011 10:21 AM

  • Migration of table from sql server to oracle

    Hi,
    I had to export few tables from SQL Server to Oracle. After the migration, I am checking to see all the tables in Oracle that have been migrated from Sql Server. I am executing select * from tab; and am seeing all the the tables (including those have been exported) from the output list of tables. However, when I am doing a select * from x; where x is one of the few tables that have been migrated, it says table or view does not exist. This is the problem with all other migrated tables. Any help is appreciated in advance. Thanks.
    [email protected]

    Try select * from "x"

  • Migrating a table from SQL server 2005 to oracle 9i

    Hi
    I need to migrate a table from SQL server to oracle, both of which are on different machines, I tried using SQL server DTS export functionality selected the Oracle driver, created a DSN, but it gave error message box as shown below
    Error Source: Microsoft OLE DB Provider for ODBC Drivers
    "ORA 12560 :TNS protocol adapter error"
    Context:Error During initialization of the provider
    While i was successfully able to migrate the table from SQL SERVER to MS-ACCESS and from MS ACCESS to Oracle
    thanks
    abhishek

    Hi
    thanks warren, i just figured out that the DSN i had created while migrating data from Access to oracle was User DSN, i just created a system DSN of the similar kind and was successfully able to export the data from SQL server to oracle, the only problem being the column names in SQL server are longer than the limit of 30 characters we have in ORACLE..
    Regards
    Abhishek

  • Create oracle table from sql server

    Dear Gurus,
    I need to create some tables from sql server 2008 to a oracle 11g database. Some tables contain vbinary datatype. Now my queries are
    1. How can I do that?
    2. If DB link is a solution then would you please provide me a step by step process to do so?
    3. Is there any issue with datatype?
    SQL Server db is on windows 2008 R2
    Oracle is in RHEL 5.5
    Will appreciate ur help.

    well suppose i generate flat files from sql server and load in oracle by sqlloader then will there be any issue with vbinary datatype? what should be the equivalent data type in oracle table?

  • How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?

    How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
    I tried using DROP Tables, Truncate Database, Delete and many more but it is not working.  I want to delete all tables using Query Analyzer, i.e. through SQL Query.
    Please help me out in this concern.
    Nishith Shah

    Informative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
    declare @TTName Table
    (TableSchemaTableName
    varchar
    (500),
    [status] int
    default 0);
    with AvailableTables
    (TableSchemaTableName)
    as
    (select
    QUOTENAME(TABLE_SCHEMA)
    +
    +
    QUOTENAME(TABLE_NAME)
    from
    INFORMATION_SCHEMA.TABLES)
    insert into @TTName
    (TableSchemaTableName)
    select *
    from AvailableTables
    declare @TableSchemaTableName varchar
    (500)
    declare @sqlstatement nvarchar
    (1000)
    while 1=1
    begin
    set @sqlstatement
    =
    'DROP TABLE '
    + @TableSchemaTableName
    exec
    sp_executeSQL
    @sqlstatement
    print
    'Dropped Table : '
    + @TableSchemaTableName
    update @TTName
    set [status]
    = 1
    where TableSchemaTableName
    = @TableSchemaTableName
    if
    (select
    count([Status])
    from @TTName
    where [Status]
    = 0)
    = 0
    break
    end

  • Problem in populating jtable data from database

    hi,
    i am using JTable to retrieve data from database and show it in table. JTable
    is working fine with static data. but while retrieving from databse its giving a NullPointerException at getColumnClass() method. Below is complete source code. plzz help.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.sql.*;
    import javax.swing.table.*;
    /*jdbc connection class*/
    class connect
    Connection con;
    Statement stat;
    public connect()throws Exception
    Class.forName("org.postgresql.Driver");
    con=DriverManager.getConnection("jdbc:postgresql://localhost/dl","dl","dl");
    stat=con.createStatement();
    public ResultSet rsf(String rsstr)throws Exception
    ResultSet rs=stat.executeQuery(rsstr);
    return rs;
    public void upf(String upstr)throws Exception
    stat.executeUpdate(upstr);
    class MyTableModel extends AbstractTableModel
    private String[] columnNames = {"name","id","dep","cat","rem","chkout"};
    Object[][] data;
    public MyTableModel()
    try{
    connect conn=new connect();
    ResultSet rs3=conn.rsf("select * from usertab");
    ResultSetMetaData rsmd=rs3.getMetaData();
    int col=rsmd.getColumnCount();
    int cou=0;while(rs3.next()){cou++;}
    data=new Object[cou][col];
    System.out.println(cou+" "+col);
    ResultSet rs2=conn.rsf("select * from usertab");
    int i=0;int j=0;
    for(i=0;i<cou;i++)
    rs2.next();
    for(j=0;j<col;j++)
    data[i][j]=rs2.getString(getColumnName(j));
    System.out.println(data[0][2]);
    }catch(Exception e){System.out.println("DFD "+e);}
            public int getColumnCount() {
                return columnNames.length;
            public int getRowCount() {
                return data.length;
            public String getColumnName(int col) {
                return columnNames[col];
            public Object getValueAt(int row, int col) {
                return data[row][col];
           public Class getColumnClass(int c) {
              return getValueAt(0, c).getClass();
            public boolean isCellEditable(int row, int col) {
                if (col < 2) {
                    return false;
                } else {
                    return true;
            public void setValueAt(Object value, int row, int col) {
                data[row][col] = value;
                fireTableCellUpdated(row, col);
    class MyFrame extends JFrame
    public MyFrame()
         setSize(600,500);
         JPanel p1=new JPanel();
         p1.setBackground(new Color(198,232,189));
         JTable table = new JTable(new MyTableModel());
         table.setPreferredScrollableViewportSize(new Dimension(500,200));
         table.setBackground(new Color(198,232,189));
         JScrollPane scrollPane = new JScrollPane(table);
         scrollPane.setBackground(new Color(198,232,189));
         p1.add(scrollPane);
         getContentPane().add(p1);
    /*Main Class*/
    class test2
         public static void main(String args[])
         MyFrame fr =new MyFrame();
         fr.setVisible(true);
    }thanx

    hi nickelb,
    i had returned Object.class in the getColumnClass() method. But then i
    got NullPointerException at getRowCount() method. i could understand that the
    main problem is in data[][] object. In all the methods its returning null values as it is so declared outside the construtor. But if i declare the object inside the constructor, then the methods could not recognize the object. it seems i cant do the either ways. hope u understood the problem.
    thanx

  • Self referencing table and SQL statement

    In my database, I have a self-referencing table, the table itself is for projects, and it allows users to get a hierarchical view of the company.
    Here is the SQL (modifier is the term we use for project code, BBCI is the top project)
    SELECT
    modifier, modifierDescription, level
    FROM
    modifier
    WHERE
    level <= 2
    CONNECT BY PRIOR
    modifier = parentModifier
    START WITH modifier = 'BBCI'
    ORDER BY level
    That perticular query gets the first two levels in the structure. I use this information to produce a tree structure in a web app.
    But users have requested it would be good if in the tree structure is showed an + or - depending on whether there were anymore children under each parent, or better still the number of children under it, for example
    BBCI
    + BBCI_CHILD
    + BBCI_CHILD2
    - BBCI_CHILD3
    or
    BBCI
    + BBCI_CHILD (3 projects underneath)
    + BBCI_CHILD2 (2 projects underneath)
    - BBCI_CHILD3 (0 projects underneath)
    I am really stumped on this issue, and I am sure there is a way to do this in the web app, so for example do a query for each child node to see how many child nodes are underneath, but I figure it would be a lot tidier and faster if I could do it from a single SQL statement. Unfortunately I have tried to do this and am very much stuck.
    If you need more information please let me know
    Thanks!
    Jon

    You may be able to do this using analytical functions but it depends on the Oracle version you are using. It can also be done with standard SQL - you just need to count the number of child rows for each modifier/project first and supply that list as an in-line view:
    SELECT decode(modifier,'X',null,decode(child_rows,null,'-','+')),
    m.modifier,
    decode(modifier,'X',null,'('||nvl(cq.child_rows,0)||' projects underneath)')
    FROM modifier m,
    (select parentModifier,
         count(parentModifier) child_rows
    from modifier
    where parentModifier is not null
    group by parentModifier) cq
    WHERE m.modifier=cq.parentModifier(+)
    AND level <= 2
    CONNECT BY PRIOR
         m.modifier = m.parentModifier
    START WITH modifier = 'X'
    ORDER BY level, modifier;
    which gives you something like...
    D MODIFIER DECODE(MODIFIER,'X',NULL
    X
    - Y1 (0 projects underneath)
    + Y2 (2 projects underneath)
    + Y3 (3 projects underneath)
    The decode stuff is just to show you the result, you can format the output in your calling code. Just extend the columns to include everything you want, modifierDescription etc..
    Hope this helps.

  • Odd results from SQL statement in JSP

    Hi.
    Getting very strange results from my SQL statement housed in my JSP.
    the last part of it is like so:
    "SELECT DISTINCT AID, ACTIVE, REQUESTOR_NAME, ..." +
    "REQUESTOR_EMAIL" +
    " FROM CHANGE_CONTROL_ADMIN a INNER JOIN CHANGE_CONTROL_USER b " +
    "ON a.CHANGE_CTRL_ID = b.CHANGE_CTRL_ID " +
      " WHERE UPPER(REQUESTOR_NAME) LIKE ? ";   I've set the following variables and statements:
    String reqName = request.getParameter("requestor_name");
    PreparedStatement prepstmt = connection.prepareStatement(preparedQuery);
    prepstmt.setString(1, "%" + reqName.trim().toUpperCase() + "%");
    ResultSet rslts = prepstmt.executeQuery();
    rslts.next();
    int aidn = rslts.getInt(1);          
    int actbox = rslts.getInt(2);     String reqname = rslts.getString(3).toUpperCase();
    String reqemails = rslts.getString(4);
    String bizct = rslts.getString(5);
    String dept = rslts.getString(6);
    String loc = rslts.getString(7);
    Date datereq = rslts.getDate(8);
    String busvp = rslts.getString(9);
    AND SO ONSo then I loop it, or try to with the following:
    <%
      try {
      while ((rslts).next()) { %>
      <tr class="style17">
        <td><%=reqname%></td><td><%=reqemails %></td><td><%=bizct %></td>td><%=dept %></td>
       <td><%=aidn %></td>
      </tr>
      <%
    rslts.close();
    selstmt.close();
    catch(Exception ex){
         ex.printStackTrace();
         log("Exception", ex);
    %>AND so on, setting 13 getXXX methods of the 16 cols in the SQL statement.
    Trouble is I'm getting wildly inconsistent results.
    For example, typing 'H' (w/o quotes) will spit out 20 duplicate records of a guy named Herman, with the rest of his corresponding info correct, just repeated for some reason.
    Typing in 'He' will bring back the record twice (2 rows of the complete result set being queried).
    However, typing in 'Her' returns nothing. I could type in 'ell' (last 3 letters of his name, Winchell) and it will again return two duplicate records, but typing in 'hell' would return nothing.
    Am I omitting something crucial from the while statement that's needed to accurately print out the results set without duplicating it and that will ensure returning it?
    There's also records in the DB that I know are there but aren't being returned. Different names (i.e. Jennifer, Jesse, Jeremy) won't be returned by typing in partial name strings like Je.
    Any insight would be largely appreciated.
    One sidenote: I can go to SQL Plus and accurately return a results set through the above query. Having said that, is it possible the JDBC driver has some kind of issue?
    Message was edited by:
    bpropes20
    Message was edited by:
    bpropes20

    Am I omitting something crucial from the while
    statement that's needed to accurately print out the
    results set without duplicating it and that will
    ensure returning it?Yes.
    In this code, nothing ever changes the value of reqname or any of the other variables.
      while ((rslts).next()) { %>
      <tr class="style17">
        <td><%=reqname%></td><td><%=reqemails %></td><td><%=bizct %></td>td><%=dept %></td>
       <td><%=aidn %></td>
      </tr>
      <%
    } You code needs to be like this:while (rslts.next()) {
      reqname = rslts.getString(3).toUpperCase();
      reqemails = rslts.getString(4);
      bizct = rslts.getString(5);
      dept = rslts.getString(6);
      loc = rslts.getString(7);
      datereq = rslts.getDate(8);
      busvp = rslts.getString(9);
    %>
      <tr class="style17">
        <td><%=reqname%></td><td><%=reqemails %></td><td><%=bizct %></td>td><%=dept %></td>
       <td><%=aidn %></td>
      </tr>
      <%
    There's also records in the DB that I know are there
    but aren't being returned. Different names (i.e.
    Jennifer, Jesse, Jeremy) won't be returned by typing
    in partial name strings like Je.Well, you're half-right, your loop won't display all the rows in the result set, because you call rslts.next(); once immediately after executing the query. That advance the result set to the first row; when the loop is entered, it starts displaying at the 2nd row (or later if there are more next() calls in the code you omitted).

  • Dynamic internal table from SELECT - statement ?

    Hi, is it possible to define an internal table just after a select statement is executed so that this internal table holds all the data that come back from the statement ?
    thanks in advance,

    Check the link -
    Re: Create Dynamic internal table
    Regards,
    Amit

  • Insert and update tables from SQL server to oracle database tables

    Hi,
    I am having problem while update data from sql server to oracle database tables.
    I am doing one way insert +updates that is from SQL Server tables ==> Oracle database tables
    I am using tools Sql server Integration service. I can insert data from sql server to oracle but update can't. Please help me how can I update + insert from sql server to oracle database tables easily.
    Thanks in advance.

    Hi,
    What about using Oracle SQL Developer for migration
    http://www.oracle.com/technetwork/database/migration/sqlserver-095136.html
    HTH

  • Create a link in a table calls sql statement

    Hello,
    I'm very new to htmldb but need to complete a project within a tight timeline. I created a sql report in a region. On each row, I have an on/off link, which used to trigger a sql statement. It turns a flag on and off in a table. Key needs to be passed with the link to be used in sql. How do I passed the key in the link and how can I call the sql statement? Where can I put the sql statement? Can someone give me some tips?
    Your help is greatly appreciated!
    Jun

    if you take a look at the "Understanding URL Syntax" section in chapter 6 of our User Guide, you'll see that you can set item values in html db via the URL by passing name/value pairs through the url. to see it in action, use our "Report with links to form on a table (2 Pages)" wizard to generate a form and a report on some table of yours. when you run that report page and click an edit link on it, you'll see how it passes its values to the form page using our URL syntax. in your case you'd want to create an item like MY_PROD_KEY_ITEM and set its value via your link. you'd then run your pl/sql block referring to the value of that item. when doing so, you'd probably want to use the bind variable syntax that's also explained in chapter 6, "Referencing Session State".
    --raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Migrating Functions that return TABLE from SQL Server to Oracle

    I have some functions in SQL Server that return a TABLE datatype. When these functions are moved to Oracle 9i using Migration Workbench, they give compilation errors. In the migrated function it says that the DDL stmt is passed to the ddl file, but the table is not created. I checked the ddl stmt for temporary tables and it is wrong. Its a create table stmt with no size for varchars and we can't even edit these stmts in the workbench.
    Also the migrated function has the table name for return type, which doesn't works in Oracle. Oracle needs a datatype to be returned from Oracle.
    How do we return a table from a function?

    Yes.
    If you do not enclose the object names (table/view/index etc) in double-quotes, they are stored in uppercase format in the data dictionary.
    If you enclose them in quotes, they are stored in the same case ans you entered. As such, while accessing such objects, you need to tell Oracle not to convert the names to uppercase, hence the requirement to supply the names in quotes.

  • Insert data file name into table from sql loader

    Hi All,
    I have a requirement to insert the data file name dynamically into table using sql loader.
    Example:
    sqlldr userid=username/passwword@host_string control=test_ctl.ctl data=test_data.dat
    test_ctl.ctl
    LOAD DATA
    FILED TERMINATED BY ','
    INTO TABLE test
    (empid number,
    ename varchar2(20),
    file_name varchar2(20) ---------- This should be the data file name which can be dynamic (coming from parameter)
    test_data.dat
    1,test
    2,hello
    3,world
    4,end
    Please help..
    Thanks in advance.
    Regards
    Anuj

    you'll probably have to write your control file on the fly, using a .bat or .sh file
    rem ===== file : test.bat ========
    rem
    rem ============== in pseudo speak =============
    rem
    rem
    echo LOAD DATA > test.ctl
    echo FILED TERMINATED BY ',' >> test.ctl
    echo INTO TABLE test >> test.ctl
    echo (empid number, >> test.ctl
    echo ename varchar2(20), >> test.ctl
    echo file_name constant %1% >> test.ctl
    echo ) >> test.ctl
    rem
    rem
    rem
    sqlldr userid=username/passwword@host_string control=test.ctl data=test_data.dat
    rem =============== end of file test.bat =======================
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#i1008664

  • Transfer tables from sql server 2008 to oracle 11g

    Hi ,
    I have to transfer 2-3 tables (5 Lacs records each) from sql server 2008 to oracle Ent. 11g (platform Linux)
    i have to upload data with some conditions.
    not allowed to install oracle client on sql server for link server. i can get data in csv file
    which will be the best possible way
    1) using Db link on oracle server
    2) get data into csv file and load using SQL loader
    3) get data into csv and load using external table
    4) using tool - sql developer
    Thanx,

    user10188639 wrote:
    Hi ,
    I have to transfer 2-3 tables (5 Lacs records each) from sql server 2008 to oracle Ent. 11g (platform Linux)
    i have to upload data with some conditions.
    not allowed to install oracle client on sql server for link server. i can get data in csv file
    which will be the best possible way
    1) using Db link on oracle server
    2) get data into csv file and load using SQL loader
    3) get data into csv and load using external table
    4) using tool - sql developer
    Thanx,
    >which will be the best possible way
    which metric measures best? is higher or lower value better?
    How will you, I or anyone recognize which option is best solution?

Maybe you are looking for