Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Posts
    56

    Unanswered: Export from Table

    Hello all,

    I would like to export some fields from a table in DB in a txt (log) file, is this possible, I know that sqlldr is used to load data into tables but here i require to output the fields of some table into a txt file or a log file. the table contains some fields which are required in the log file.

    please let me know as how to go about this.

    Thanks and regards

  2. #2
    Join Date
    Jul 2006
    Location
    Bangalore
    Posts
    57
    you could spool the output of your query into file.

    ex:

    spool /tmp/out
    set pagesize 0;
    set linesize 0;
    set echo off;
    set header off;
    select * from emp;
    spool off
    Ritesh Kumar Singh
    IBM Certified DB2 DBA for LUW
    **Knowledge Is Theft If Not Shared !!**

  3. #3
    Join Date
    Sep 2007
    Posts
    56
    Thanks,

    It works as required :-)

Posting Permissions

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