August 27, 2009 at 11:37 pm
Dear Gurus
Here is my scenario.... hmmm
single call - count stockgroup IF CUSTOMER SAME BUT DIFF STOCKGROUP = 1 else 0
multiple call - count docno If SAME STOCK GROUP = 0 ELSE 1
docno agent STOCKGROUP customer Single Count MUltiple Count
iv001 1 AB a 1 1
iv001 1 BC b 1 1
iv001 1 AB a 0 0
iv002 2 de b 1 1
iv003 2 ab a 1 1
I'm stuck with tries to concat multiple column to get a distinct concat..to enable the count..
but still having no luck...
Anyone could give a helping hand or some tips on how to perform such manipulation in TSQL?
Help would be deeply appreciate
Regards,
Terri
August 30, 2009 at 12:22 pm
Maybe you noticed many people stepped into this thread but didn't answer you...
I think it might help if you post some sample code (create temp tables, populate demo data) so we can understand what you're trying to achieve..
Just my 2 cents...
August 30, 2009 at 1:28 pm
I'm not sure what the actual question or result set is supposed to be. Please see the following... the methods there will help us help you a lot better.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply