I'm not sure I quite follow. Is there a concentration for each location for each of a master list of pollutants? What concentration would be considered "not there"?
In any case, look at a construct like (ABS(concentration) <= <tolerance>), where <tolerance can be either a constant or a field associated with a particular pollutant. That construct will return TRUE or FALSE, which evaluate to 1 and 0, respectively. I hope that helps. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 05, 2007 2:47 PM > To: mysql@lists.mysql.com > Subject: return integer for positive values > > > I have a table with a list of pollutants. I have a table of > locations, site names, counties, etc. I can join the these > tables together and get a list of of all the pollutants at a > site. But, what I am really wanting is a list of all the > pollutants with a integer field, zero for pollutant not here, > 1 for pollutant here. > > So that instead of the list I get now: > benzaldehyde > freon > formaldehyde > > I would get: > > lead 0 > acetone 0 > benzaldehyde 1 > butane 0 > freon 1 > formaldehyde 1 > > How can I return an integer for positive values like this in a query? > > --ja > > > -- > > > -- > 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]