Click here to Skip to main content


QuestionSQL Query Pinmemberberba29-Nov-12 2:22 
AnswerRe: SQL Query PinmemberRichard Deeming29-Nov-12 2:50 
GeneralRe: SQL Query Pinmemberberba2-Dec-12 18:30 
QuestionSQL Server windows authentication Pinmemberzead28-Nov-12 23:49 
AnswerRe: SQL Server windows authentication PinmemberGarth J Lancaster28-Nov-12 23:59 
AnswerRe: SQL Server windows authentication Pinmemberjschell29-Nov-12 8:09 
GeneralRe: SQL Server windows authentication PinmemberChris Meech30-Nov-12 3:45 
QuestionNeed help with a tricky MS SQL Query Pinmembermuya mwansa27-Nov-12 6:46 
Hi, I was given a tricky challenge question to attempt and allowed the use of any resources at my disposal. So far all my attempts have produced results close to the expected output but not quiet the expected out put. Here's the link to the question: Question and here's where you can test your query: test here.
Here's my query that produced the closest results:
SELECT        DISTINCT Competencies.CompName AS compname, Users.FirstName AS firstname, Users.SurName AS surname, CompPos.Level AS positionlevel, CompUser.Level AS userlevel
FROM            Positions INNER JOIN CompPos 
				ON Positions.PosId = CompPos.PosID 
				INNER JOIN Competencies   
				ON CompPos.CompID = Competencies.CompID
				INNER JOIN CompUser
				ON Competencies.CompID = CompUser.CompID	
				CROSS JOIN Users
WHERE 		(Users.UserId IN ('999209', 'helpdesk1', '999339', 'helpdesk5', '999827'))
AND        (CompUser.UserID IN ('999209', 'helpdesk1', '999339', 'helpdesk5', '999827'))
AND 		(Positions.Position LIKE '%Corp HR-People Development-Wellness-Manager(Process)%')
ORDER BY CompPos.Level DESC, Competencies.CompName, CompUser.Level, Users.FirstName, Users.SurName

AnswerRe: Need help with a tricky MS SQL Query PinmemberEddy Vluggen27-Nov-12 13:31 
GeneralRe: Need help with a tricky MS SQL Query Pinmemberjschell28-Nov-12 8:43 
AnswerRe: Need help with a tricky MS SQL Query PinmemberDeepak Kumar1128-Nov-12 1:03 
QuestionBest Approach For Designing Database PinmemberAmbiguousName27-Nov-12 3:59 
AnswerRe: Best Approach For Designing Database Pinmemberjschell27-Nov-12 13:13 
AnswerRe: Best Approach For Designing Database PinmemberMycroft Holmes27-Nov-12 13:14 
AnswerRe: Best Approach For Designing Database PinmemberEddy Vluggen27-Nov-12 13:23 
AnswerRe: Best Approach For Designing Database PinmemberKrishna Kumar Soni3-Dec-12 1:04 
QuestionEXEC sp_helptext Pinmemberjojoba201126-Nov-12 22:43 
AnswerRe: EXEC sp_helptext PinmemberMycroft Holmes26-Nov-12 23:30 
QuestionRe: EXEC sp_helptext Pinmemberjojoba201126-Nov-12 23:38 
AnswerRe: EXEC sp_helptext Pinmemberdjj5527-Nov-12 0:59 
QuestionRe: EXEC sp_helptext [modified] Pinmemberjojoba201127-Nov-12 3:09 
AnswerRe: EXEC sp_helptext PinmemberEddy Vluggen27-Nov-12 13:33 
QuestionRECORD VALIDATION IN ACCESS Pinmemberteto26-Nov-12 5:19 
SuggestionRe: RECORD VALIDATION IN ACCESS PinmemberAndré Kraak26-Nov-12 5:56 
AnswerRe: RECORD VALIDATION IN ACCESS Pinmemberdjj5526-Nov-12 6:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 28 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid