Hi there
I have 3 tables: Customer, CustomerTypes, CustomerCustomerTypes. CustomerCustomerTypes is basically is a bridge table between the Customer and CustomerTypes.
Table structure: Customers: CustomerID CustomerName
CustomerTypes: CustomerTypeID CusctomerTypeName
CustomerCustomerTypeID CustomerID CustomerTypeID
Sample Data: Customers:
1, ABC
2, CBA
CustomerTypes:
1, Broadcast
2, Banking
3, Retailer
CustomerCustomerTypes:
1, 1
2, 2
2, 3
I want to be able to return query as follow:
ABC; "Broadcasting"
CustomerCustomerTypes; "Banking, Retailer"
as well as to be able to search that string let say "CustomerTypeID = 2"
It will be ruturned as :
CustomerCustomerTypes; "Banking, Retailer"
I can do this with cursor type of query BUT i am just wondering maybe there is a better way.
Thanks