O'Connor, Patricia (OTDA)
Patricia.O'Connor at otda.state.ny.us
Wed Dec 21 13:32:55 CST 2005
Hi All Quick question on Union Query results - I am having a brain freeze If I have 3 groups of data that one group gets filled by each union portion Is it possible and how do I define the query so that only one record is produced for each total grouping Example: A fills a, B fills b, C fills c. Select a1,a2,a3,b1,b2,b3,c1,c2,c3 from table1 where x3 = "A" Union Select a1,a2,a3,b1,b2,b3,c1,c2,c3 from table1 where x3 = "B" Union Select a1,a2,a3,b1,b2,b3,c1,c2,c3 from table1 where x3 = "C" Right now I get 3 records for each group - I would like to only get 1 records with all groups filled. Could have sworn I have done this before but just can't get brain to clear Thanks Patti ************************************************** * Patricia O'Connor * Associate Computer Programmer Analyst * OTDA - BDMA * (W) mailto:Patricia.O'Connor at otda.state.ny.us * (w) mailto:aa1160 at otda.state.ny.us ************************************************** -------------------------------------------------------- This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.