PDA

View Full Version : Left Justifying in Table View



TonyD
August 1st, 2003, 07:35 AM
Hi

I have extracted out my data in to the table window. But! Is there anyway of left justifying the data as i need to export as fixed width format and i don't want spaces at the start of some of the data in the columns.

Example below

Column 1

Fred
Bod
(Spaces)Chris
Paul
(Spaces)John
David

I want it to display as the following

Column 1

Fred
Bod
Chris
Paul
John
David

Any ideas without having to do a query in every column in the table.

Thanks
Tony

[ August 01, 2003, 06:36 AM: Message edited by: TonyD ]

Grant Perkins
August 1st, 2003, 08:20 AM
Tony,

Presumably the spaces are the result of the positioning of the field related to the original data in your report file. (This in turn may be the result of original data entry?)

Is there any way to fix this problme on the original report?

If not, and without seeing the report, the 'standard' fix would be to create calculated fields from each of the problem fields and use the TRIM function to remove leading spaces (and RTRIM to remove trailing spaces if desired).

You would then produce your export fixed width file using the calculated versions of the fields rather than the original field.

Hope this helps.

Grant


Originally posted by TonyD:
Hi

I have extracted out my data in to the table window. But! Is there anyway of left justifying the data as i need to export as fixed width format and i don't want spaces at the start of some of the data in the columns.

Example below

Column 1

Fred
Bod
(Spaces)Chris
Paul
(Spaces)John
David

I want it to display as the following

Column 1

Fred
Bod
Chris
Paul
John
David

Any ideas without having to do a query in every column in the table.

Thanks
Tony

TonyD
August 1st, 2003, 08:38 AM
Yeah that was what i thought. Basically the original report is a text file with spaces in front of some of the field data. I will probably go with the calculated fields.

Mant Thanks
Tony