Re: Qustion on Select statement

  • From: Bill Zakrzewski <bill@xxxxxxxxxxxx>
  • To: RStorey@xxxxxxxxxxxxxxxxxx
  • Date: Thu, 2 Dec 2010 15:59:31 -0500

change it to....

select rpad(value1,15) || rpad(value2,12) || rpad(value3,8)
from <table>
where value1 > 100


-Bill
On Dec 2, 2010, at 3:37 PM, Storey, Robert (DCSO) wrote:

> I’ve written a query to produce a flat file through the use of the Spool 
> command.  Everything works perfectly except for one small detail.
>  
> By default, the output of a Select statement has a default colsep of a blank. 
>  So, my formatting is way off due to a single blank being inserted between 
> each of the returned values in my line.
>  
> Select rpad(value1,15), rpad(value2,12), rpad(value3,8)
> From <table>
> Where value1 > 100.
>  
> So, what I get is (using a $ for blanks and a * for the field padding).
>  
> Value1*********$value2******$value3**
>  
> Is there a way or a setting that would disable the separation between values 
> returned in a Select?
>  
> Thanks, Bob
>  
>  

Other related posts: