Advertisement

05.04.2008 at 08:50PM PDT, ID: 23375658
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.1

returning a string value from sqlserver procedure

Asked by sydneyguy in MS SQL Server, Microsoft Access Database

Tags: , ,

I have a msaccess report that fires off a stored procedure as the code below shows
what i have is that the procedure fires asks for a start date and end date, then these values are used to build another table that I use for my report. But I require these dates to display on the report so I need to return the vaues for example   return @startdate + '  to ' + @finishdate or create a varable and build this string then return the string so that I can place it on the report. then how do I access the value to place it on the top of the report that was used to find the data..
But every time I try it keeps compaining about the fact that it cannot return an int value. the code below is were I have left it, have tried various string configurations but to no avail declare string return string ect
should be easy for a sql guru
thanks for you help in advance
*********************************************************
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AppendToAcademicProgressRptBoth]
      @StartDate smalldatetime,
      @FinishDate smalldatetime
AS
SET NOCOUNT ON;
BEGIN
Declare @return_value varchar(20)
DELETE from AcademicProgressRptBoth
where ID > 0

INSERT INTO AcademicProgressRptBoth ( StudCourseID, Status, ModuleID )
SELECT     dbo.StudentCourse.StudCourseID AS Expr2, dbo.StudentModules.Status, dbo.StudentModules.ModuleID
FROM         dbo.StudentModules INNER JOIN
                     dbo.StudentCourse ON dbo.StudentModules.StudCourseID = dbo.StudentCourse.StudCourseID
WHERE    
 dbo.StudentModules.DateComplete >= @StartDate and  dbo.StudentModules.DateComplete <= @FinishDate

return @startdate + ' to ' + @finishdate
ENDStart Free Trial
[+][-]05.04.2008 at 09:15PM PDT, ID: 21498105

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, Microsoft Access Database
Tags: sqlsever 2005, microsoft, 2005
Sign Up Now!
Solution Provided By: MohammedU
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.04.2008 at 09:48PM PDT, ID: 21498165

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 10:16PM PDT, ID: 21498223

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 10:45PM PDT, ID: 21498303

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.04.2008 at 10:48PM PDT, ID: 21498312

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2008 at 11:34PM PDT, ID: 21498420

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.05.2008 at 12:46AM PDT, ID: 21498615

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.31.2008 at 10:40PM PDT, ID: 22357700

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628