View Single Post

   
  #3 (permalink)  
Old 04-08-2008, 06:16 PM
Chris
 
Posts: n/a
Default Re: Impossible formatting with isql ?

Mark A. Parsons wrote:

> Make sure you submit the '-w<width>' flag to isql to make sure output
> lines are <width> characters wide.
>
> (I believe the default is 255 characters; if the result set is longer
> than 255 characters then the 'overflow' will be printed on a new line;
> this can lead to some unwanted results if your OS commands aren't
> expecting the embedded CR/LF's.)
>
> Assuming you *are* using the '-w' flag ... you'll need to post more
> details ... actual SQL query ... what you're doing out in the OS (eg,
> isql call, what you're doing with the output, etc.).


Yes, I use -w, but it's only for the line length, not the field length.
The SQL query has nothing special, I just concatenate fields at special
positions in order to build a 500 characters line (1 field) for the file
(Field 1 : pos 2, Field 2 : pos 16, Field 3 : pos 30 , ...) :

--Field 1-------Field 2-------Field 3------ ...


But after position 255, it doesn't work anymore :-(

Reply With Quote