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
  • 704,970
  • 168
  • 1,303
  • 1,425
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,352
  • 3
  • 25
  • 49
  • 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