0

I have 2 tables in database

tblServices:

serviceID    
serviceName

tblDomains:

domainID  
domainName  
Parent   

Now I want to select

serviceID serviceName domainID domainName1 domainName2 domainName3 ... 

i.e I want to select all the domainName as rows where parent == serviceName

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Amir
  • 1

1 Answers1

-1

Simple Way To Use Pivot In SQL Query http://www.codeproject.com/Tips/500811/Simple-Way-To-Use-Pivot-In-SQL-Query

One Example Here. Efficiently convert rows to columns in sql server

Community
  • 1
  • 1
A_Sk
  • 4,532
  • 3
  • 27
  • 51
  • 2
    please don't simply post links, at least offer some explanation as to how this can be applied. if those links move or change, this answer will be useless. – Tanner Feb 19 '15 at 10:42