Thanks for the quick reply Chris.
 
It's close but it's a little off. Your example also returns all
instances that where the letter N exists in another words as well
 
Do you know of a way to prevent that?
 
Thanks again

>>> Chris White <[EMAIL PROTECTED]> 12/7/06 3:11 PM >>>
On Thursday 07 December 2006 14:57, Ed Reed wrote:
> Can someone help me with this?

quick hack, but it works from what you've stated:

mysql> create table num_test (id SERIAL PRIMARY KEY, value
VARCHAR(256));
Query OK, 0 rows affected (0.07 sec)

mysql> insert into num_test (value) VALUES
('N400'),('400'),('300'),('N500');
Query OK, 4 rows affected (0.03 sec)
Records: 4  Duplicates: 0  Warnings: 0

mysql> SELECT REPLACE(value,'N','') as value_num, value FROM num_test
WHERE 
POSITION('N' IN value);
+-----------+-------+
| value_num | value |
+-----------+-------+
| 400       | N400  |
| 500       | N500  |
+-----------+-------+
2 rows in set (0.00 sec)


-- 
Chris White
PHP Programmer
Interfuel

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

Reply via email to