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

Thread: a bit urgent

  1. #1
    Join Date
    Jun 2001
    i have a db set up on sun OS
    And my local machine in which the client xists is NT
    Now everytime we get a ascii file with data....throgh FTP ...and it is stored in a dir in the db server....

    And I run a script to upload this data into db using sql plus on my NT machine..

    The problem is that...the data file when it reaches to my place has a ^M character as suffix for all lines...

    Which is seen only If i go directly on to the server and open the file...
    and not whn i open the file in my NT env..

    is there a possibel was that when i open the file for read to load data through my plsql..i can check if this ^M char xists and yes..i can just omit it?

    I hope i am clear enuff

    thank you

  2. #2
    Join Date
    Feb 2001
    Paris, France
    use binary transfer mode

  3. #3


    The easiest thing to do is to convert the file.. If you use A utility like PFE (Programmers file editor), open the file, choose save-as and select unix-format. The ^M's will dissapear.

    Failing that, you could do a pre-ckeck using plsql - open the file using UTL_FILE, read each line checking for instr(line, '^M') <>0.

  4. #4
    Join Date
    May 2001

    Incorrect FTP mode

    As pointed out by Pipo,

    Use the right FTP mode to transfer files - Binary or Ascii
    A farmer learns more from a bad harvest than a good one

  5. #5
    Join Date
    Apr 2001
    It is the didfference in the OS. Use the Solaris utils, dos2unix and unix2dos to convert files for the proper OS.

  6. #6
    Join Date
    Feb 2001
    Paris, France
    the easiest thing to do is to use binary ftp (just type bin under your ftop prompt)
    you also can use a sed or use a simple regular expression under vi :


    (note : you get ^M by doing Ctrl-V, then enter)

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