Re: Fixed with Fields

2005-01-28 Thread Eamon Daly
Are you talking about display width? Use the RPAD function:
http://dev.mysql.com/doc/mysql/en/string-functions.html
mysql> SELECT RPAD('foo', 20, 'x') AS foo;
+--+
| foo  |
+--+
| foox |
+--+

Eamon Daly

- Original Message - 
From: "Marc Michalowski" <[EMAIL PROTECTED]>
To: 
Sent: Friday, January 28, 2005 12:27 PM
Subject: Fixed with Fields


I was wondering if there is a way to create fixed width fields. Example:
The field is set to 18 but data contained is 11. I need the length to
remain 18. Is there anyway to do this? Thanks for your help.
-Marc

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Fixed with Fields

2005-01-28 Thread Nick Arnett
Dathan Pattishall wrote:
Use char
 

And use fixed-length types for *all* columns... one variable-length 
column makes all records variable-length. 

Nick
-Original Message-
From: Marc Michalowski [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 28, 2005 10:28 AM
To: mysql@lists.mysql.com
Subject: Fixed with Fields

I was wondering if there is a way to create fixed width 
fields. Example:
The field is set to 18 but data contained is 11. I need the 
length to remain 18. Is there anyway to do this? Thanks for your help.

-Marc
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

   

 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Fixed with Fields

2005-01-28 Thread Dathan Pattishall
Use char

DVP

Dathan Vance Pattishall http://www.friendster.com

 

> -Original Message-
> From: Marc Michalowski [mailto:[EMAIL PROTECTED] 
> Sent: Friday, January 28, 2005 10:28 AM
> To: mysql@lists.mysql.com
> Subject: Fixed with Fields
> 
> I was wondering if there is a way to create fixed width 
> fields. Example:
> The field is set to 18 but data contained is 11. I need the 
> length to remain 18. Is there anyway to do this? Thanks for your help.
> 
> -Marc
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Fixed with Fields

2005-01-28 Thread Marc Michalowski
I was wondering if there is a way to create fixed width fields. Example:
The field is set to 18 but data contained is 11. I need the length to
remain 18. Is there anyway to do this? Thanks for your help.

-Marc


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]