Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2003
    Posts
    10

    Unanswered: file of data - which method

    I have a requirement (using forms or pl/sql) to be able to either create a sqlloader formatted file or a CSV format file.


    Does another have an example of either?

  2. #2
    Join Date
    Sep 2003
    Location
    NE Florida w/ view of co-workers
    Posts
    32
    Here is a link to the SQL*Loader documentation.

    http://download-west.oracle.com/docs.../ch03.htm#1656

  3. #3
    Join Date
    Sep 2003
    Location
    The Netherlands
    Posts
    311
    hi,

    it's really not that hard.
    To create a CSV file, either use SQL*Plus or PL/SQL.
    Using SQL create a .sql file containing :

    set heading off
    set pages 0
    set echo off
    set verify off
    spool filename.csv

    select empno||','||''''||empname||''''||','||deptno
    from emp;

    spool off

    and run the .sql file. Output are written to filename.csv

    Using PL/SQL, create a procedure using utl file.
    Using PL/SQL you will be able to use this is a form, by calling it in the form

    Hope this helps.
    Edwin van Hattem
    OCP DBA / System analyst

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •