Computing.Net > Forums > Database > SQL+ how to spool with data padding

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

SQL+ how to spool with data padding

Reply to Message Icon

Name: nine00
Date: March 29, 2007 at 08:53:48 Pacific
OS: WinXP
CPU/Ram: 3.6GHz / 3.5GB RAM
Product: Dell Optiplex GX620
Comment:

I have a table with data that I want to output using the spool command. The output file is required to have an exact amount of whitespaces after the data. For example, the first 3 fields are defined as:

firstname varchar2(15)
middlename varchar2(15)
lastname varchar2(25)

'John James Doe' is the first record.

I need to spool that data with trailing blank spaces described below:

John(11 blank spaces)James(10 blank spaces)Doe(22 blank spaces)

Any help would be appreciated.

-Thanh



Sponsored Link
Ads by Google

Response Number 1
Name: wizard-fred
Date: March 31, 2007 at 22:50:30 Pacific
Reply:

A spool was typically a device to buffer output until it could be printed. Therefore normally it would hold the formatted output of the report. It seems what you want to do is spool the data file to another data file. A simple program could be written to output a temporary file of the proper format. Or a database application could read and use the data directly.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Database Forum Home


Sponsored links

Ads by Google


Results for: SQL+ how to spool with data padding

how to capture listbox data? www.computing.net/answers/dbase/how-to-capture-listbox-data/358.html

How to allocate the data equally to members www.computing.net/answers/dbase/how-to-allocate-the-data-equally-to-members/642.html

SQL Server Reporting Services www.computing.net/answers/dbase/sql-server-reporting-services/722.html