Home » SQL & PL/SQL » SQL & PL/SQL » printing data in a specified format using utl_file
printing data in a specified format using utl_file [message #287508] Wed, 12 December 2007 07:37 Go to next message
ridhi_sundar
Messages: 184
Registered: November 2007
Location: Bangalore
Senior Member
I am usinf utl_file to print data to a text file. I want the data to be printed in a specified format. I mean the 1st data on position 1 then the next in position 30 the next on position 50.

Is there any function to seek to the desired position directly?
Re: printing data in a specified format using utl_file [message #287509 is a reply to message #287508] Wed, 12 December 2007 07:39 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
you could look at using the lpad/rpad functions which will allow you to output a fixed width string.
Re: printing data in a specified format using utl_file [message #287532 is a reply to message #287508] Wed, 12 December 2007 09:36 Go to previous message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Search in the oracle manual for utl_file.putf ... I believe most of the formatting functions available in c like (%d, %s, %f) should be available in this function. Please bear in mind i have not tested it.

HTH

Cheers

Raj

Previous Topic: Need help with a where clause
Next Topic: sql%rowcount not working as expected. 0 rowcount?
Goto Forum:
  


Current Time: Sat Dec 03 14:13:50 CST 2016

Total time taken to generate the page: 0.07738 seconds