First letter only of a column

2004-04-13 Thread Tim Johnson
Hello:
Is it possible to use mysql to select only
the first letter of a string in a column?
IOWS select names from table - 
 select first letter of names from table
another way of asking my questions would be,
Is it possible to truncate columns in selection
set to a specific length (in the case: 1)

Pointers to relevant documents are welcome.

Thanks
tim
-- 
Tim Johnson [EMAIL PROTECTED]
  http://www.alaska-internet-solutions.com

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



Re: First letter only of a column

2004-04-13 Thread Kevin Carlson
try this:

select  LEFT(names, 1) from table

Tim Johnson wrote:

Hello:
   Is it possible to use mysql to select only
the first letter of a string in a column?
IOWS select names from table - 
select first letter of names from table
another way of asking my questions would be,
Is it possible to truncate columns in selection
set to a specific length (in the case: 1)

Pointers to relevant documents are welcome.

Thanks
tim
 

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


Re: First letter only of a column

2004-04-13 Thread Tim Johnson
* Peter Lovatt [EMAIL PROTECTED] [040413 16:27]:
 Hi
 
 select left(field, 1) from table where field = something
 
 http://dev.mysql.com/doc/mysql/en/String_functions.html

* Kevin Carlson [EMAIL PROTECTED] [040413 16:27]:
 try this:

 select  LEFT(names, 1) from table

 Thanks folks.
 I love it!

 tim

..  another way of asking my questions would be,
  Is it possible to truncate columns in selection
  set to a specific length (in the case: 1)
  
  Pointers to relevant documents are welcome.

-- 
Tim Johnson [EMAIL PROTECTED]
  http://www.alaska-internet-solutions.com

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