SQL Loader

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • antonopn
    New Member
    • Mar 2008
    • 42

    SQL Loader

    Hello there,

    I have a semicolon delimited text file (lets say 'c:\myfile.txt' ).

    I want to insert it into a table in a 8.1.6 oracle database (lets say 'mydatabase.dbo .mytable')

    I tried searching the internet for some scripts, but I get an error message "LOAD DATA not a recognised command" or something like this.

    Could someone PLEASE help me? I'm a newbie in oracle. MS SQL procedure importing text files (bulk insert) is a lot easier in my opinion.

    Thank you for your time...
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    try the following

    Code:
    load data
    infile 'd:\debasis\data.dat'
    insert
    into  table mydept
    fields terminated by  ";"
    (deptno,dname,loc)

    Comment

    • antonopn
      New Member
      • Mar 2008
      • 42

      #3
      Should I create the table before this procedure or not?

      Thanks a lot debasisdas!!!!

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        yes table must exist before the laoding.

        the code is not a procedure

        you need to put that in a control file and execute that from command prompt

        Comment

        Working...