I'm getting closer..Mike White is helping me with it offline as well. I'm basically building sub-queries to look through and weed out the pieces I don't want to have.
Thanks, Jason -----Original Message----- From: Ben Scott [mailto:[email protected]] Sent: Thursday, January 22, 2009 12:47 PM To: NT System Admin Issues Subject: Re: MS SQL Query Help On Thu, Jan 22, 2009 at 11:37 AM, Jason Morris <[email protected]> wrote: > SELECT INVHH.HH_ORD, INVHH.HH_NME,MNBDD.BD_GLSA FROM INVHH > JOIN MNBDD ON MNBDD.BD_TID = INVHH.HH_TID > WHERE MNBDD.BD_GLSA IN (here's my problem) Not sure (my SQL is weak), but a "GROUP BY BD_GLSA" clause may get you closer to what you want. To count each one, I think "COUNT DISTINCT (BD_GLSA)" in the FROM clause field list will help. I'm not sure you can combine the two, though. -- Ben ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ ------------------------------------------------------------------------------------------ The pages accompanying this email transmission contain information from MJMC, Inc., which is confidential and/or privileged. The information is to be for the use of the individual or entity named on this cover sheet. If you are not the intended recipient, you are hereby notified that any disclosure, dissemination, distribution, or copying of this communication is strictly prohibited. If you received this transmission in error, please immediately notify us by telephone so that we can arrange for the retrieval of the original document. ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
