Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Functions, Parameters and Scripts

Author  Topic 

r083rt13
Starting Member

1 Post

Posted - 2013-06-09 : 20:56:36
Hello, I am quite new to SQL and am trying to write sql statements for the following...

Is there anyone here who could help with this? I am completely confused.

Thanks to anyone who is able to help:

1.Create a function named fnFindBestConsultant that returns the ConsultantID of the consultant that has best average evaluation score on all the projects that he/she had been work on.

2.Create script that use result of question 1 and list the best consultant’s name and the average evaluation score that he/she got.

3. Create a table-valued function fnListConsultantProjects that take 3 parameters: consultant first name, consultant last name, and RollOnDate. This function will return a table with Consultant Full name, projectID, project name, RollOnDate after the parameter value, and RollOffDate base on parameters value. If no parameter is given, function should return all consultants and all projects that they have been work on.

4. Run the function to return all consultants’ project that has a RollOnDate after 2010/06/01

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-06-09 : 21:01:38
We don't do homework here.

Post what you have tried and any specific question that you may have, we will be happy to answer it.


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-06-10 : 01:28:59
Hi ,
Have you tried solutions for the above questions? Try now itself and then post us once you face any difficulties
refer the following link to create user-defined functions with examples...
http://msdn.microsoft.com/en-us/magazine/cc164062.aspx

--
Chandu
Go to Top of Page
   

- Advertisement -