sql query to match all row with other row on same table
I have a table that hold my products and services. I want to match every
product with my services than i will assign base price to my services
according to my product.
My table is as follows
ID TypeID Title
=========================
1 1 Product1
2 1 Product2
3 1 Product3
4 2 Service1
5 2 Service2
6 2 Service3
I want this table to return.
ProductID ServiceID ProductTitle ServiceTitle
=========================================================
1 4 Product1 Service1
1 5 Product1 Service2
1 6 Product1 Service3
2 4 Product2 Service1
2 5 Product2 Service2
2 6 Product2 Service3
3 4 Product3 Service1
3 5 Product3 Service2
3 6 Product3 Service3
how can i do that with Ms SQL 2008??
No comments:
Post a Comment