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:
SELECTDISTINCT Competencies.CompName AS compname, Users.FirstName AS firstname, Users.SurName AS surname, CompPos.Level AS positionlevel, CompUser.Level AS userlevel
FROM Positions INNERJOIN CompPos
ON Positions.PosId = CompPos.PosID
ON CompPos.CompID = Competencies.CompID
ON Competencies.CompID = CompUser.CompID
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)%')
ORDERBY CompPos.Level DESC, Competencies.CompName, CompUser.Level, Users.FirstName, Users.SurName
Please try this one, if this helps, u might need to do some modification.
select Competencies.CompName AS compname, Users.FirstName AS firstname, Users.SurName AS surname, CompPos.Level AS positionlevel, CompUser.Level AS userlevel from Users
left outer join compuser
on users.userid = compuser.userid
left outer join Competencies
on compuser.compid = Competencies.compid
left outer join CompPos
on CompPos.compid = Competencies.compid
left outer join Positions
on Positions.posid = CompPos.posid and Positions.Position LIKE '%Corp HR-People Development-Wellness-Manager(Process)%'
WHERE Users.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
Hello. I am developing a small project in C#, in which I show chosen passages from a book.
Now I am not sure how do I store these passages in database? Currently I am considering these two options 1 - Storing passages as pictures in folders BUT their paths in the database. My application will get these paths and load the content in the window. 2 - Storing the actual text content in the database and load it in the window.
Can you please help me decide which way is better? Or is there any better way to do it? Thanks
This world is going to explode due to international politics, SOON.
the result is :[Note: I have change Create ----> Alert
ASBEGINSELECT WF.Cartable.JobId, Forms.tblVacationDaily.Id, Forms.tblVacationDaily.IsWorkFlow, Forms.tblVacationDaily.CreateUserID,
Forms.tblVacationDaily.CreateDate, Forms.tblVacationDaily.StepId, Forms.tblVacationDaily.RecordId, Forms.tblVacationDaily.OrderId, Forms.tblVacationDaily.PersonId,
WF.Cartable.ForwardedUserId, WF.Cartable.RecieveUserId, WF.Cartable.IsDeleted, p1.FullName AS RecieveUserName, p2.FullName AS ForwardedUserName,
FROM WF.Cartable INNERJOIN
WF.JobFormConjuction ON WF.JobFormConjuction.JobId = WF.Cartable.JobId INNERJOIN
Forms.tblVacationDaily ON Forms.tblVacationDaily.RecordId = WF.JobFormConjuction.RecordId AND Forms.tblVacationDaily.StepId = WF.Cartable.StepID - 1INNERJOIN
Persons.People AS p1 ON p1.Id = WF.Cartable.RecieveUserId INNERJOIN
Persons.People AS p2 ON p2.Id = WF.Cartable.ForwardedUserId
WHERE (Forms.tblVacationDaily.RecordId = @RecordId) AND (WF.Cartable.JobId = @JobId) AND (Forms.tblVacationDaily.StepId<=@StepId)
Now the BUG/ERROR :
The content is same but the names are diffrent :
but the sp is :
why the names are different ?
Thanks in advanced but the sp was renamed before and now its working properly!
but when i right click the sp and click on modify is diffrent from sp_helptext. and event the name of it in sp list is also different from sp_helptext !
Hi everyone! I need to grant permission on a table in a database to a database role in another database.
I have client database containing information about clients. In another database, I have roles for different departments. Now I need to grant permission on specific tables in the client database to roles or departments which are located in another database.
I have been struggling for a solution but have not succeeded. Is there any way to accomplish this task? Please help.