Home » SQL & PL/SQL » SQL & PL/SQL » Enter symbol is coming while inserting rows table into file (Oracle 9i)
Enter symbol is coming while inserting rows table into file [message #310017] Mon, 31 March 2008 00:01 Go to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi,

I am inserting the rows from oracle table into text file by UTL_FILE method. It inserting well. I need every record in a single line.. but its coming with enter symbol at the end of line and continuing the same line. If i copy these text and paste in another notepad means, its coming perfect... so what to do for this? Give your suggestion.

Thanks
Mano





Re: Enter symbol is coming while inserting rows table into file [message #310022 is a reply to message #310017] Mon, 31 March 2008 00:12 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>Messages: 130
Frequent poster!

You have a problem.
You don't post any reproducible supporting details.

You're On Your Own.
Re: Enter symbol is coming while inserting rows table into file [message #310024 is a reply to message #310017] Mon, 31 March 2008 00:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So use notepad to see it.
Isn't the answer obvious?

Regards
Michel

[Updated on: Mon, 31 March 2008 00:15]

Report message to a moderator

Re: Enter symbol is coming while inserting rows table into file [message #310025 is a reply to message #310017] Mon, 31 March 2008 00:16 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Sorry michel,, in notepad only its coming like this... If i copy the things and paste in wordpad means, its coming well...
Re: Enter symbol is coming while inserting rows table into file [message #310026 is a reply to message #310017] Mon, 31 March 2008 00:18 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>in notepad only its coming like this...
So you say.
So use wordpad.
WHAT is your problem?
Only you know now.
Re: Enter symbol is coming while inserting rows table into file [message #310030 is a reply to message #310017] Mon, 31 March 2008 00:24 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
i m using this...

UTL_FILE.put_line(file,data);

file - D:\mano\mm.txt

So, its default user will use open notpead only.. in the notepad, i dont want that enter symbol... how to eliminate that one?

Thanks
Mano


Re: Enter symbol is coming while inserting rows table into file [message #310031 is a reply to message #310017] Mon, 31 March 2008 00:27 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>So, its default user will use open notpead only.. in the notepad, i dont want that enter symbol... how to eliminate that one?

Sorry, you have just failed the Turing Test.
Re: Enter symbol is coming while inserting rows table into file [message #310032 is a reply to message #310026] Mon, 31 March 2008 00:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Uncheck notepad wrap option.

Regards
Michel
Re: Enter symbol is coming while inserting rows table into file [message #310035 is a reply to message #310017] Mon, 31 March 2008 00:38 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Uncheck also not solved the problem
Re: Enter symbol is coming while inserting rows table into file [message #310038 is a reply to message #310017] Mon, 31 March 2008 00:49 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
At what point do you acknowledge that a rock can not be taught?
Re: Enter symbol is coming while inserting rows table into file [message #310043 is a reply to message #310031] Mon, 31 March 2008 01:03 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
anacedent wrote on Mon, 31 March 2008 07:27
>So, its default user will use open notpead only.. in the notepad, i dont want that enter symbol... how to eliminate that one?

Sorry, you have just failed the Turing Test.

LOL.
Although kinda harsh, it totally made my day start good!
(But OP asked for it)

[Updated on: Mon, 31 March 2008 01:04]

Report message to a moderator

Re: Enter symbol is coming while inserting rows table into file [message #310047 is a reply to message #310017] Mon, 31 March 2008 01:15 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
Reality SUCKS, but it is what is it is.
Re: Enter symbol is coming while inserting rows table into file [message #310077 is a reply to message #310017] Mon, 31 March 2008 03:38 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hello friends,

i am taking data from table into cursor c1 like
c1 having...
1001,Manoharan,2000
1002,Suj,3000
.
.
.
Through UTL_FILE.put i am inserting data into text file using,

buffer_data Varchar2(30000);
f UTL_FILE%filetype;
buffer_data:=c1.empno || '|' c1.ename || '|' c1.sal;
F:=UTL_FILE.fopen('DIR','Sam.txt',32000)
UTL_FILE.put(f,buffer_data)

Its working fine.. but in the text file its coming like this...
1001,Manoharan,2000 1002,Suj,3000...
I need

1001,Manoharan,2000
1002,Suj,3000

Thanks
Mano

[Updated on: Mon, 31 March 2008 03:47] by Moderator

Report message to a moderator

Re: Enter symbol is coming while inserting rows table into file [message #310080 is a reply to message #310077] Mon, 31 March 2008 03:43 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
What?

First you tell us you get an Enter and don't want it and now you tell us you don't get one and want one?

Would you please make up your mind? ./fa/1620/0/



Re: Enter symbol is coming while inserting rows table into file [message #310082 is a reply to message #310077] Mon, 31 March 2008 03:49 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
put,new_line,put_line...

Regards
Michel
Re: Enter symbol is coming while inserting rows table into file [message #310119 is a reply to message #310077] Mon, 31 March 2008 06:15 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
O.k let me guess what you might have done.

step 1 : create a csv file in unix using utl_file
step 2 : file transfer the csv file using binary mode
step 3 : open the file using notepad you can see the square symbol end of every line
step 4 : open the file using wordpad and you are not seeing the square symbol in end of every line.

Am I correct ? If I am correct then perform the ftp using ascii mode and see what happens .

Regards

Raj
Re: Enter symbol is coming while inserting rows table into file [message #310424 is a reply to message #310017] Tue, 01 April 2008 03:59 Go to previous message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Exactly you are right Mr.Raj. I solved that problem by using
Chr(13)

Previous Topic: Constraint Error
Next Topic: when a ROWNUM value is actually assigned ?
Goto Forum:
  


Current Time: Sun Dec 04 00:23:06 CST 2016

Total time taken to generate the page: 0.04861 seconds