Thursday, April 30, 2015

Case statement Help needed

I have a Table ManageGroups here`s the structure

P_ID Varchar(10) Not null, = 'Abc13'

Producttype varchar(20) not null, = 'PCPC'

LineofBusiness varchar(10) not null = 'Comm' and ' non comm'

I have a resultset which lists me all the products there are several products which are sold as 'Comm' and 'non Comm', I am trying to identify all the PID`s which are the following.

1.) Commercial

2.) Non Commercial

3.) Both in Commercial and NonCommercial 

My resultset should look like this

PID        LineoFBusiness
abc123        Commercial
bbc112        Non Commercial
Sam100      Commercial & Non commercial



Can you help me with this ?


FM

No comments:

Post a Comment