Here's an odd one:
I can't seem to make a where clause containing 'and' work
db=# select orgname,usertype from users where usertype='Drug
Addiction';
orgname | usertype
------------------------------------+----------------
Turning Point Scotland | Drug Addiction
Govan Youth Access Project | Drug Addiction
Community Learning West Team | Drug Addiction
Possil Learning Centre | Drug Addiction
Langside College (Glenwood Campus) | Drug Addiction
Rehab Remanufacturing Services Ltd | Drug Addiction
Greater Pollok Addiction Service | Drug Addiction
db=# select orgname,usertype from users where usertype='Alcohol
Addiction';
orgname | usertype
------------------------------------+-------------------
Possil Learning Centre | Alcohol Addiction
Greater Pollok Age Concern | Alcohol Addiction
Rehab Remanufacturing Services Ltd | Alcohol Addiction
Greater Pollok Addiction Service | Alcohol Addiction
db=# select orgname from users where usertype='Alcohol
Addiction' and usertype ='Drug Addiction';
orgname | usertype
---------+----------
(0 rows)
I would expect orgnames:
Greater Pollok Addiction Service,
Rehab Remanufacturing Services Ltd
to be returned.
Any idea where I'm going wrong?
Cheers
Paul Butler