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

Thread: Export to file

  1. #1
    Join Date
    May 2006
    Posts
    3

    Export to file

    Hi.

    I don't know if this is the right forum to contact.

    How do I export two records to a e.g. txt file.

    I have a

    select XX from XX
    where xx like '%xx%'

    Nicolai

  2. #2
    Join Date
    Apr 2006
    Posts
    377
    You don't mention what platform you are on, but on UNIX based systems the following should work:

    Code:
    exp username file=/tmp/exp.dmp \
    tables=XX query=\"where xx like \'%xx%\'\"
    You can put the entire command on one line and omit the backslash at the end of the first line. (The command just fit better in the forum this way.)

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    dont think thats what he means, he wants to a txt file

    if from sqlplus do sppol and run your query

    you dont specify what format you want either

  4. #4
    Join Date
    Apr 2006
    Posts
    377
    Ahhh...sure enough, I seemed to overlook that "small" detail

  5. #5
    Join Date
    May 2006
    Posts
    3

    Thanks

    So if I understand you right. I use sqlplus and specify what two entries I want to export to a text file.

    BWT i'm on a win98 with a ora95 (not my fault )

    Nicolai

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    ora95??? whats that

    anyway, specify what you want and you might get a fulll answer

  7. #7
    Join Date
    Apr 2006
    Posts
    377
    That's correct. As davey23uk indicated, you can perform the following while in SQL*Plus:

    Code:
    spool c:\temp\output.log
    select XX from XX
    where xx like '%xx%';
    spool off

  8. #8
    Join Date
    May 2006
    Posts
    3

    That did it!

    Thanks alot for your help.

    I really appricated it.

    Nicolai

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