Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
explain table variable in briefly with examples
Posted
Updated 8-Apr-14 22:44pm
v4
Comments
Schatak 9-Apr-14 3:23am    
Other profile?
syed shanu 9-Apr-14 3:36am    
1) You can use in clause for example -- where profile in('Software Engineer','otherorif1','otherorif1''otherorif1') -- (2) In whare doncition donc chek the profile.if you tell me some more details i can try to help you.
Schatak 9-Apr-14 3:55am    
One more question here, how you ca saving their specialization in specialization column? are the inserting hard coded or dynamically?

1 solution

SQL
SELECT  distinct Profile,stuff((select distinct ', '  +  Specialization  FROM TM_Specialization tms INNER JOIN TM_Profile tmp
ON tms.ProfileID=tmp.ProfileID where tms.ProfileID =tm_p.ProfileID
FOR XML PATH('')
) ,1,1,'') as Specialization
FROM TM_Profile TM_P INNER JOIN  TM_Specialization TM_s
ON TM_S.ProfileID=TM_P.ProfileID
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900