An AND only works where you are specify columns that must be exclusive, not rows.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 25 November 2002 17:29 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] Dynamic SQL column data SELECT DISTINCT MID FROM Answers WHERE QID = 11 and answer = "whatever" AND QID = 12 and answer = "something" AND Additional requirements here not sure why that wouldn't work? Duncan Cumming IT Manager http://www.alienationdesign.co.uk mailto:[EMAIL PROTECTED] Tel: 0141 575 9700 Fax: 0141 575 9600 Creative solutions in a technical world ---------------------------------------------------------------------- Get your domain names online from: http://www.alienationdomains.co.uk Reseller options available! ---------------------------------------------------------------------- ---------------------------------------------------------------------- "Snake" <snake@snakep To: <[EMAIL PROTECTED]> it.net> cc: Subject: [ cf-dev ] Dynamic SQL column data 11/25/02 05:04 PM Please respond to dev Got a bit of a dilemma here. I have data that is stored thus AID QID MID answer 585 11 1016 586 14 1016 619 1 1033 Hmmm 620 15 1033 Creative Partnerships Staff 621 15 1033 Cultural Organisation MID = memberID AID=AnswerID QID = QuestionID I need to pull out all distinct memberID's where they have for example QID = 11 and answer = "whatever" AND QID = 12 and answer = "something" AND Addiitonal requirements here Of course a standard AND wont work as it is different rows not different columns. -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
