Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
SQL
DECLARE @PROFILE VARCHAR(255)
set @PROFILE='DB Developer'

SELECT  @PROFILE=profile from TM_Profile where profile=@PROFILE



select @PROFILE as Profile,c.lookupvalue as platform,d.SkillLookupValue as skills from Reference c
INNER join
Reference_Skills d
on c.Lookupid = SkillLookupKey   where @PROFILE='DB Developer' and c.lookupvalue='Database'
Posted
Updated 30-Apr-14 23:27pm
v6
Comments
CHill60 30-Apr-14 11:21am    
What is your question?
Member 10501509 30-Apr-14 11:23am    
i want to fetch data for each profile -->platfrom and skills
Member 10501509 30-Apr-14 11:24am    
i have fetched data for one profile please u can see in above output. similarly i want to fetch for all profiles.
CHill60 30-Apr-14 12:15pm    
You are not fetching data based on profile - it's hard-coded and not being read from table Reference or Reference_Skills. You are selecting values based on c.lookupvalue='Database'.
And the line SELECT @PROFILE=profile from TM_Profile where profile=@PROFILE is meaningless ... set a value to a field where that field is equal to the value just set in the line above.
Member 10501509 30-Apr-14 12:20pm    
i am not getting it please help me

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