Thread: Query Issue
View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 09:33 AM
Jeff Gardner
 
Posts: n/a
Default Query Issue

I have a table with about 41k rows with 10 columns, one titled "Gender",
the options being M, F, and U of text data type. When I query against
this table:

SELECT *
FROM `table`
WHERE 'Gender' = 'M'

It returns no records. If I change the query to:

SELECT *
FROM `table`
WHERE 'Gender' != 'M'

It returns all records, including those with 'M' in them. Regardless of
the WHERE 'Gender' clause, i.e. U, M, F, or NULL, I get the same
behavior. I really would like to avoid performing manual operations on
41,000 records but need to change the value of NULL or blank 'Gender' to
'U'. I've checked whitespace and have determined that there is none
involved, so far as these queries go. Any advice would be appreciated.
--

Regards,

Jeff Gardner
___________________________

"Contrary to popular belief, Unix is user friendly. It just happens
to be very selective about who its friends are." --Kyle Hearn
Reply With Quote