MySQL Forums
Forum List  »  Perl

Re: executing an SQL statement
Posted by: Randy Clamons
Date: April 17, 2007 05:54PM

Lois,

I can't help you much specifically unless I know more about your data. But you can use this approach to achieve the results you want.

You more than likely have variable length fields that you are writing to the report that would probably cause your columns to not line up.

The space between columns that you want to add and the alignment of the columns can both be solved using the function RPAD(str,len,padstr). str is the field contents, len is the width of the column you want including the data itself, padstr will be a space " ".

Wrap each field in the RPAD() function and you should be able to get the results you want.

Options: ReplyQuote


Subject
Written By
Posted
April 10, 2007 04:15PM
April 11, 2007 10:02AM
April 11, 2007 03:56PM
April 11, 2007 10:08AM
April 13, 2007 12:26PM
April 17, 2007 04:26PM
Re: executing an SQL statement
April 17, 2007 05:54PM
April 18, 2007 12:30PM
April 18, 2007 04:02PM
April 23, 2007 04:08PM
April 24, 2007 09:20AM
April 24, 2007 11:39AM
April 24, 2007 02:26PM
April 24, 2007 02:20PM
April 24, 2007 02:31PM
April 24, 2007 03:57PM
April 25, 2007 11:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.