DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Extracting dat to text files --- appending to existing file

Hybrid View

  1. #1
    Join Date
    Aug 2000
    Location
    NJ
    Posts
    54

    Question

    Hi,

    I have a task to pull date out from a large table (4GB)
    I would be trying different SQL to generte them at diffetent times to a sigle text file.
    Here's the sample scritp that I wrote to do it:

    set pause off
    --set newpage none
    set heading off
    set pagesize 0
    set concat ~
    --set feedback off
    --set verify off
    --set linesize 1000
    set trimspool off
    set trimout off
    set termout off
    spool c:\bg1\test1.txt
    select PRSBR_ID||'|'||PRSBR_NAME||'|'||PRSBR_ADDR1 from
    test1 where prsbr_id='10001'
    order by prsbr_name;
    spool off

    Each time I run this I need to append the data to an already existing text file called test1.txt.
    How do we do that.
    Could someone send me better scripts to do this ???
    THanks,

    GEO

  2. #2
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    You can use the 'cat' command to append a file to another.

Posting Permissions

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


Click Here to Expand Forum to Full Width