Map excel columns to oracle table column using forms 6i

Hello,
I am importing data from excel to oracle table using oracle forms 6i.
Suppose my table have 3 columns id, name,sal. The excel sheet i am importing having
3 or more colums, also excel sheet columns are not in order as per table columns.
i.e my table have id, name, sal
and excel have name, sal, id
my question is how can i map excel colums with table colums and insert it into table.
I am using oracle 6i forms (ole2 package).
Thanks

What was wrong with the first answer to the same question?
Re: map excel columns on oracle forms and insert it into database

Similar Messages

  • Map Excel worksheet into Oracle tables in repository

    I am new to VB2005. I am working on VB code that can map(read) any table from excel worksheet and load it into Oracle tables. Oracle tables that I have are: 1)META_OBJECTTYPES
    (OBJECTTYPEID pk,OBJECTTYPENAME,OBJECTTYPEDESC, OBJECTMETATYPE,OBJECTDOMAIN).
    2) META_OBJECTS(OBJECTKEY PK,OBJECTTYPEID FK,OBJECTNAME,OBJECTDESC).
    3)META_OBJECTDEPENDENCIES(SRCOBJECTKEY FK, TGTOBJECTKEY FK,DEPENDENCYTYPE PK)
    4)META_OBJECTATTRIBUTES
    (OBJECTKEY FK, OBJECTATTRNAME PK,OBJECTATTRVALUE).
    NOTICE META_OBJECTTYPES IS PARENT TO META_OBJECTS AND META_OBJECTS IS PARENT TO (META_OBJECTDEPENDENCIES AND META_OBJECTATTRIBUTES) AND ALL PARENT HAS 1 TO MANY REALTIONSHIP TO CHILD TABLES. For example, I have employee table in Excel worksheet that has two columns employee_id number, employee_name varchar2(50) I need my vb code map table name employee with its 2 columns into my 4 tables that I have in Oracle table repository,
    My code so far just insert values into oracle tables in repository, but what is require is mapping table with contents into oracle tables. If my expanation isn't clear plz let me know.
    Imports System
    Imports System.Data
    Imports Oracle.DataAccess.Client '
    Imports Excel = Microsoft.Office.Interop.Excel
    Public Class Form1
    'System.Data.OracleClient lets you access Oracle databases.
    Public con As System.Data.OracleClient.OracleConnection = NewSystem.Data.OracleClient.OracleConnection()
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim xlApp As Excel.Application
    Dim xlWorkBook As Excel.Workbook
    Dim xlWorkSheet As Excel.Worksheet
    Dim range As Excel.Range
    Dim rCnt As Integer
    Dim cCnt As Integer
    Dim Obj As Object
    xlApp = New Excel.ApplicationClass
    xlApp.Visible = True
    xlWorkBook = xlApp.Workbooks.Open("c:\employee.xls")
    xlWorkSheet = xlWorkBook.Worksheets("sheet1")
    range = xlWorkSheet.UsedRange
    For rCnt = 2 To range.Rows.Count 'rows in Excel start from row2
    For cCnt = 1 To range.Columns.Count 'column in Excel start from col1
    Obj = CType(range.Cells(rCnt, cCnt), Excel.Range)
    MsgBox(Obj.value)
    Next
    Next
    xlWorkBook.Close()
    xlApp.Quit()
    releaseObject(xlApp)
    releaseObject(xlWorkBook)
    releaseObject(xlWorkSheet)
    End Sub
    Private Sub releaseObject(ByVal obj As Object)
    Try
    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
    obj = Nothing
    Catch ex As Exception
    obj = Nothing
    Finally
    GC.Collect()
    End Try
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    '2.Specify connection string
    con.ConnectionString = ("Data Source=gema;User Id=dare; Password=rtae")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "insert into meta_objecttypes values (4,'TABLE', 'TABLES','ERstudio','Demo')"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    cmd.CommandText = "commit"
    cmd.ExecuteNonQuery()
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    If TableName.Text = "" Then
    MsgBox("Please enter the tablename", MsgBoxStyle.Exclamation, "OraScan")
    Exit Sub
    End If
    MsgBox(TableName.Text, MsgBoxStyle.Exclamation, "OraScan")
    '2.Specify connection string
    con.ConnectionString = ("Data Source=gema;User Id=dare; Password=rtae")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "select * from user_objects where object_name='" + UCase(TableName.Text) + "' and object_type='TABLE'"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    'cmd.CommandText = "commit"
    'cmd.ExecuteNonQuery()
    MsgBox("Command executed successfully", MsgBoxStyle.Exclamation, "OraScan")
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TableName.TextChanged
    End Sub
    End Class

    Don't know if this will help you or not, but I have some code that will read from and Excel spreadsheet and put the data into a DataSet (i'm sure something else could be used).
    string connectionString =
    @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\\testRead.xls;Excel 12.0;HDR=YES;IMEX=1";
    DbProviderFactory factory =
    DbProviderFactories.GetFactory("System.Data.OleDb");
    DbDataAdapter adapter = factory.CreateDataAdapter();
    DbCommand selectCommand = factory.CreateCommand();
    selectCommand.CommandText = "SELECT * FROM [dogs$]";
    DbConnection connection = factory.CreateConnection();
    connection.ConnectionString = connectionString;
    selectCommand.Connection = connection;
    adapter.SelectCommand = selectCommand;
    DataSet cities = new DataSet();
    adapter.Fill(cities);
    GridView1.DataSource = cities;
    GridView1.DataBind();
    Your provider might be different; the one above is for Office 2007. The [dogs$] in the selectCommand.commandText is the name of the worksheet in Excel.
    Hope this helps

  • Map Excel worksheet into Oracle tables repository

    I am new to VB2005. I am working on VB code that can map(read) any table from excel worksheet and load it into Oracle table. Oracle table that I have are: 1)META_OBJECTTYPES(OBJECTTYPEID pk,OBJECTTYPENAME,OBJECTTYPEDESC, OBJECTMETATYPE,OBJECTDOMAIN).
    2) META_OBJECTS(OBJECTKEY PK,OBJECTTYPEID FK,OBJECTNAME,OBJECTDESC).
    3)META_OBJECTDEPENDENCIES(SRCOBJECTKEY FK, TGTOBJECTKEY FK,DEPENDENCYTYPE PK)
    4)META_OBJECTATTRIBUTES((OBJECTKEY FK, OBJECTATTRNAME PK,OBJECTATTRVALUE). NOTICE META_OBJECTTYPES IS PARENT TO META_OBJECTS AND META_OBJECTS IS PARENT TO (META_OBJECTDEPENDENCIES AND META_OBJECTATTRIBUTES) AND ALL PARENT HAS 1 TO MANY REALTIONSHIP TO CHILD TABLES. For example I have employee table in Excel worksheet that has two columns employee_id number, employee_name varchar2(50) I need my vb code map table name employee with its 2 columns into my 4 tables that I have in Oracle repository,
    My code so far just insert values into oracle tables in repository, but what is require is mapping table with contents into oracle tables.
    Imports System
    Imports System.Data ' VB.NET
    Imports Oracle.DataAccess.Client ' ODP.NET Oracle data provider
    Imports Excel = Microsoft.Office.Interop.Excel
    Public Class Form1
    'System.Data.OracleClient lets you access Oracle databases.
    Public con As System.Data.OracleClient.OracleConnection = New System.Data.OracleClient.OracleConnection() 'Oracle.DataAccess.Client.OracleConnection()
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim xlApp As Excel.Application
    Dim xlWorkBook As Excel.Workbook
    Dim xlWorkSheet As Excel.Worksheet
    Dim range As Excel.Range
    Dim rCnt As Integer
    Dim cCnt As Integer
    Dim Obj As Object
    xlApp = New Excel.ApplicationClass
    xlApp.Visible = True
    xlWorkBook = xlApp.Workbooks.Open("c:\employee.xls")
    xlWorkSheet = xlWorkBook.Worksheets("sheet1")
    range = xlWorkSheet.UsedRange
    For rCnt = 2 To range.Rows.Count
    For cCnt = 1 To range.Columns.Count
    Obj = CType(range.Cells(rCnt, cCnt), Excel.Range)
    MsgBox(Obj.value)
    Next
    Next
    xlWorkBook.Close()
    xlApp.Quit()
    releaseObject(xlApp)
    releaseObject(xlWorkBook)
    releaseObject(xlWorkSheet)
    End Sub
    Private Sub releaseObject(ByVal obj As Object)
    Try
    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
    obj = Nothing
    Catch ex As Exception
    obj = Nothing
    Finally
    GC.Collect()
    End Try
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    '2.Specify connection string
    con.ConnectionString = ("Data Source=dprod;User Id=smughrabi; Password=Sul9966")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "insert into meta_objecttypes values (4,'TABLE', 'TABLES','ERstudio','Demo')"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    cmd.CommandText = "commit"
    cmd.ExecuteNonQuery()
    'Catch ex As Exception
    '4.display if any error occurs
    'MsgBox(ex.Message, Microsoft.VisualBasic.MsgBoxStyle.Exclamation, "OraScan")
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click
    Dim daOracle As New OracleDataAdapter
    Dim InsertCommand As New OracleCommand
    daOracle.InsertCommand = New OracleCommand
    '1.Create connection object to Oracle database
    Dim con As OracleConnection = New OracleConnection()
    Try
    If TableName.Text = "" Then
    MsgBox("Please enter the tablename", MsgBoxStyle.Exclamation, "OraScan")
    Exit Sub
    End If
    MsgBox(TableName.Text, MsgBoxStyle.Exclamation, "OraScan")
    '2.Specify connection string
    con.ConnectionString = ("Data Source=gema;User Id=dare; Password=rtae")
    '3. Open the connection through ODP.NET
    con.Open()
    Dim cmd As OracleCommand = New OracleCommand
    cmd.Connection = con
    cmd.CommandType = CommandType.Text
    cmd.CommandText = "select * from user_objects where object_name='" + UCase(TableName.Text) + "' and object_type='TABLE'"
    cmd.ExecuteNonQuery()
    'You have to commit to be inserted into DB
    'cmd.CommandText = "commit"
    'cmd.ExecuteNonQuery()
    MsgBox("Command executed successfully", MsgBoxStyle.Exclamation, "OraScan")
    'Catch ex As Exception
    '4.display if any error occurs
    'MsgBox(ex.Message, Microsoft.VisualBasic.MsgBoxStyle.Exclamation, "OraScan")
    Finally
    ' Close and Dispose OracleConnection object
    con.Close()
    con.Dispose()
    End Try
    End Sub
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TableName.TextChanged
    End Sub
    End Class

    Thanks Lyndon, what I need is map any table someone create in Excel worksheet to Oracle repository.For example to map Excel worksheet(employee)table with its 2 columns to oracle table META_OBJECTTYPES(OBJECTTYPEID pk,OBJECTTYPENAME,OBJECTTYPEDESC, OBJECTMETATYPE,OBJECTDOMAIN). In my case I have 2 objecttypes 1)table(employee) and 2nd columns:employee_id,employee_name
    --for inserting table info manually into DB:
    INSERT INTO META_OBJECTS
    (OBJECTKEY, OBJECTTYPEID,OBJECTNAME,OBJECTDESC)
    VALUES
    (META_OBJECTS_SEQ.NEXTVAL,
    4, --TABLE  
    'employee',--notice this is table name from Excel worksheet
    'Table to store employee info')
    --for inserting columns info:
    INSERT INTO META_OBJECTS
    (OBJECTKEY, OBJECTTYPEID,OBJECTNAME,OBJECTDESC)
    VALUES
    (META_OBJECTS_SEQ.NEXTVAL,5,'employee_id or name','employee column')
    notice above I insert manually Excel worksheet employee table with its two cols into oracle meta_objecttypes. What I want is VB to do this I mean if I go to Toad and erase what I insert in meta_objecttypes when I run vb, the program should map table employee with its 2 cols to Toad(DB). I hope it is clear now. Please refer to 1 st post for 3 other tables in DB

  • Upload data from excel file to Oracle table

    Dear All,
    I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
    Could you tell me please how can i do this using PLSQl or SQL Loader.
    Thnaks in Advance..

    Dear All,
    I have to upload data from excel file to
    Oracle table without using third party tools and
    without converting into CSV file.
    Could you tell me please how can i do this
    using PLSQl or SQL Loader.
    Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
    http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
    Khurram                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Help Required :Excel Upload Into Oracle Table Using PLSQL Procedure/Package

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    I also Tried to Use This
    But How can i Use SQLLDR Command In Stored Procedure.
    Well IN SQL*PlUS it is successfull but in Stored Procedure /Package ,PL/SQL does not recognise the OS commands.
    So now my Question How can I recognise the SQLLDR Commnad in Stored Procedure.

  • When reading the Rich Text present in Excel column using open XML its taking it as plain text

    Hello All,
    When i am reading excel columns using open Xml in C# everything is working fine except the column that
    contain Rich Text (ex: bold, italic,color,size). Its reading the Rich Text content as plain text. As we know for Rich Text in open XML we get the text as Runs (C#
    object) which contains the text as value and rpr as run properties. I have also written the code to convert Runs to html. But the issue is that for some Rich Text format its reading it as Runs but most of the Rich Text its reading it as plain text.
    The issue i am getting is, for some rich text its creating RUN and for some of the rich text its not creatingRUN.
    Let me give the example for more understanding:
    Suppose i have two cells in excel which contains the below text.
    1. Rich Text
    1
    2. RichText
    2
    Now when i read these cells using the below code
    var stringTable =spreadsheetDocument.WorkbookPart.GetPartsOfType<SharedStringTablePart>().FirstOrDefault();
    if (stringTable.SharedStringTable.ElementAt(index1).ChildElements.GetItem(0).GetType().Name == "Run")
    Custom code to convert Rich text to HTML...
    else
    Read the plain text...
    Though both the cell contains rich text, one is going in RUN block and one is going in Plain text bloc.
    Also, one thing that i have noticed is when i use standard color for text its consider it as RUNS and when i use color apart from the standard color it does not consider it as RUNS. Same behavior occurs for different combination of text viz. bold, italic, underline
    etc

    Hi Ejaz,
    This forum is for software developers who are using the Open Specification documentation to assist them in developing systems, services, and applications that are interoperable with Microsoft products. The Open Specifications can be found at:
    http://msdn.microsoft.com/en-us/library/cc203350(PROT.10).aspx. Since your post does not appear to be related to the Open Specification documentation set, we would appreciate it if
    you could try to post your question in a more relevant forum. Thank you.
    Open XML Format SDK
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=oxmlsdk&filter=alltypes&sort=lastpostdesc
    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

  • How do i load data in excel to an oracle table

    How do i load data from an excel file with several worksheets into an oracle table?
    using Oracle 10g
    Excel
    sample data of excel
    Name eric Name mary
    AccountNo 123 AccountNo 321
    amount1 5.0 Amount1 1.0
    amount2 5.5 Amount2 2.0
    amount3 6.0 Amount3 3.0
    Total 16.5 Total 6.0
    Name larry Name beth
    AccountNo 123 AccountNo 321
    amount1 5.0 Amount1 1.0
    amount2 5.5 Amount2 2.0
    amount3 6.0 Amount3 3.0
    Total 16.5 Total 6.0
    Note: Assume data are aligned into columns like a real excel workbook

    Hi,
    You can make one csv file per sheet. After what you can use sql*loader utyility.
    Since 9i, there is external table : http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_7002.htm#i2129649
    Nicolas.

  • How to load excel data into oracle table

    How do i load data from an excel file with several worksheets into an oracle table?
    using Oracle 10g
    Excel
    sample data of excel
    Name eric Name mary
    AccountNo 123 AccountNo 321
    amount1 5.0 Amount1 1.0
    amount2 5.5 Amount2 2.0
    amount3 6.0 Amount3 3.0
    Total 16.5 Total 6.0
    Name larry Name beth
    AccountNo 123 AccountNo 321
    amount1 5.0 Amount1 1.0
    amount2 5.5 Amount2 2.0
    amount3 6.0 Amount3 3.0
    Total 16.5 Total 6.0
    Note: Assume data are aligned into columns like a real excel workbook

    I have some used something like this.
    don't ask any details as I am not a xl person, but i think its pretty straight forword.
    hope its helpful for you or someone else
    Dim i As Integer
    Dim conn As New ADODB.Connection
    Dim strInsert As String
    Dim strExecInsert As String
    conn.ConnectionString = "Provider=MSDAORA.1;User ID=scott;password=tiger;Data Source=orcl.world;Persist Security Info=False"
    conn.Open
    strInsert = "insert into xlsc ( emp, dept, doj," & _
    "dol, dob, Ce ,ED, v_date ) values("
    'this is to insert first 2347 rows from xl to orcl
    While i < 2348
    strExecInsert = strInsert & "'" & _
    Trim(Cells(i, 1).Value) & "','" & _
    Trim(Cells(i, 2).Value) & "','" & _
    Trim(Cells(i, 3).Value) & "','" & _
    Trim(Cells(i, 4).Value) & "','" & _
    Trim(Cells(i, 5).Value) & "','" & _
    Trim(Cells(i, 6).Value) & "','" & _
    Trim(Cells(i, 7).Value) & "','" & _
    Trim(Cells(i, 8).Value) & "' )"
    'MsgBox strExecInsert
    If Cells(i, 1).Value <> "" Then
    conn.Execute (strExecInsert)
    End If
    i = i + 1
    Wend
    'conn.Execute ("commit")
    conn.Close
    End Sub

  • Importing excel data into oracle tables

    Hello gurus,
    Importing excel data into oracle tables..
    I know this is the most common question on the thread ...First, i searched the forum, i found bunch of threads with loading data using sqlloader, converting excel into .Txt, tab delimited file, .csv file etc....
    Finally i was totally confused in terms how to get this done....
    Here is wat i have
       - Excel file on local computer.
       - i have laod data into dev environment tables(So no risk involved, but want to try something simple)
       - Oracle version 11.1.0.7
       - Sqlplus and toad (editors)
    Here is wat i like to do ....i dont know if its possible
        - Without going to unix server can i do everthing on local system by making use of oracle db and sqlplus or toad
       SQLLOADER might be one option...but i dont want to go the unix server for placing files and logs and stuff.
    Wat will be best and simplest option to do?? and wat format will best to convert from excel into csv, or txt or tab delimited etc.....
    If you suggest sqlloader, any code example will be greatly appriciated.
    Thank you so much!!!

    Hi,
    user642297 wrote:
    Imran,
    This is increadible option in toad!!! It works absolutely sweet!! I have toad 9.7 version. IT works great. Thank you so much!!You are welcome :)
    Well i have further discussion on this ....this option is great if you doing in staging or development area. What if your doing in prod?? If you automating the sqlloader then how do u do it?? I think we still need to stick with traditional approach of laoding data by making use of SQLLoader right ?? If m wrong please correct me.well, in our case, we do have access to a custom schema in prod where we create the staging table and load the data from datafiles.
    try this:
    load data
    infile 'C:\dest.csv'
    into table dest_table
    fields terminated by "~" optionally enclosed by '"'
    TRAILING NULLCOLS
    (name,
    owner_nm,
    description_column,
    UPDT_DT DATE 'MM/DD/YYYY')
    {code}
    you can get more info about sql loader and your error here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch05.htm
    http://www.allinterview.com/showanswers/53766.html
    And one more quick question ...i found an example of control file , in that i see .dat format file. Is it a data file ?? can i try that option ?? But in excel i didnt see to convert the .dat format file.
    Any thoughts ???
    It is same as a delimiter text file.
    steps to create a .dat file (from a excel file):
    1. Insert a column between two columns and populate it with the delimiter (in our case, it is ~)
    2. Save the file as unicode text.
    3. Open the file in text editor and remove all the tabs (find an replace with blank)
    4. Save the file as "DEST.dat". Select encoding as UTF-8 while saving.
    5. Your .dat file is ready.
    Regards
    Imran
    Edited by: Imran Soudagar on Apr 22, 2010 10:22 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Display distinct rows from Oracle table without using "DISTINCT" keyword.

    How to retrieve distinct rows from oracle table without using 'DISTINCT' keyword in SQL?
    Thanks in advance.
    Mihir

    Welcome to the forum.
    Besides GROUP BY you can use UNIQUE instead of DISTINCT as well, but that's probably not wanted here ;) , and the ROW_NUMBER() analytic:
    SQL> create table t as
      2  select 1 col1 from dual union all
      3  select 1 from dual union all
      4  select 2 from dual union all
      5  select 3 from dual union all
      6  select 4 from dual union all
      7  select 4 from dual;
    Table created
    SQL> select col1 from t;
          COL1
             1
             1
             2
             3
             4
             4
    6 rows selected
    SQL> select distinct col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select unique col1 from t;
          COL1
             1
             2
             3
             4
    SQL> select col1 from t group by col1;
          COL1
             1
             2
             3
             4
    SQL> select col1
      2  from ( select col1
      3         ,      row_number() over (partition by col1 order by col1) rn
      4         from   t
      5       )
      6  where rn=1;
          COL1
             1
             2
             3
             4

  • Connecting to oracle 11g XE using forms 6i

    Dear sir
    i would like to connect to my database in oracle 11g xe using forms 6i; i have tried with normal procedure of defining a service name locally and connecting thru that, but it didn't work, forms 6i crashes while tring to connect to database. can anyone help me to do that?
    thanks in advance
    uday

    911781 wrote:
    yes tnsnames.ora i have configured accordingly
    please find below the contents of respective tnsnames.ora
    forms tnsnames.ora
    CRMXE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.9)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = xe)
    database tnsnames.ora
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-E929IBU4N98.derivequity.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    )Hello, Uday
    copy bellow TNS to your forms TNS
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-E929IBU4N98.derivequity.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    )It's just TNS Problem...
    Hope it works...
    If someone's response is helpful or correct, please mark it accordingly.

  • Map FLAT file to oracle table using 9.04 version - PLS HELP!!!!

    Hello all
    I am having a problem with mapping a flat file to oracle table. The validation is successful, when I go to Project/Deployment manager. Try to deploy the mapping itself and the target table. It said succesful, and the last step is another "Deploy", this one is fail. Saying could not locate the file (which is a flat file) , but it is there on the server.
    I have read all the help on line and follow what they show me, but still not work
    Any ideas? Please provide detail answer if you know it.
    Thank in advance

    Hallo,
    just give a rights on connector
    Variant 1
    1. connect to user sys
    2. grant read,write on directory <connector_name> to <target_schema>;
    or
    Variant 2
    1. as user sys or system give CREATE_ANY_DIRECTORY to <target_schema>
    2. manualy make CREATE DIRECTORY <connector_name> as '<full_path_to_directory>';
    and enjoy :)
    PS: <connector_name> you can take from script CREATE_TABLE wisch in Generation phase was created!
    Kirill

  • Want to load excel data into oracle table with out changing it to CSV

    Hello all,
    I have a requirement in dumping excel data into oracle database table without changing it to CSV file and this has to be used in normal sql/plsql environment i.e., pkg/procedure cant be used in the forms also...
    so, can u guys can help me out in this
    thanks.............

    The link Pavan provided discusses Oracle Heterogeneous Services. This allows you (using ODBC) to create a database link from Oracle to a non-Oracle data source like Excel. This would allow you to query the Excel data source from SQL*Plus or any other client tool. But that is probably going to require that your Oracle database is running on Windows since I'm not aware of any Excel ODBC drivers for Unix.
    Another potential option would be to write a Java stored procedure that parsed the file. There are a few different Java libraries that can read and write Excel data files. You could load one of those libraries into the database's JVM and then write Java code that parsed the file. You would then be able to call your Java stored procedure from PL/SQL.
    Justin

  • Order By Clause on Non-Database Column using Forms

    How to Sort by using Order by Clause on Non-Database Column using Forms6i

    Eugene,
    What is the error message/ number you are seeing? If you run "select name from tblperson order by name" do you still get an error?

Maybe you are looking for

  • Error reading Web application occurs when starting one server in the cluster

    Hi All,           I have configured two cluster servers in the win 2000. Admin server also win           2000. One cluster server joins the cluster while other gives following error           and starts. But it seems that it does not join to the clus

  • 1210 printer problem

    I have a 1210 printer, uses 56, 57 cartridges.  When I printed photos I got a line down the middle of the pix.  I cleaned inside of printer, bought new cartridges at cost of almost $60.  Now I still get the line down the middle of the printed pix.  D

  • How can I load and process an HTML5 file with Javascript in the same way as an XML file?

    I maintain a diary in local weekly files that I am converting to HTML5 from XHTML. I wish to extract all the "articles" about particular topics from these files and display them in different orders. It is possible to load an XHTML file using the load

  • Settings in sequence

    Two questions about settings in Sequence: I record in HDV Progressive. FCP: easy setup: 1080p25 (europe).. I upload the footages. Than when editting (putting the footages on the timeline) FCP asked me: "For best performance your sequence and external

  • Is Canon PIXMA MG8220 supported by Easy-PhotoPrint Pro? Can several printer drives coexist?

    According to the Canon site, Easy-PhotoPrint Pro supports PIXMA MG8220, but when the former is automated from Photoshop CC in MacBook Pro it does not find any supported driver. Canon helpers do not answer this question flatly. Would any one know the