I write the below stored procedure but only show the columns in the first select statement when add stored procedure to crystal report ,I want make all select statements as a single select statement :
- CREATE proc [dbo].[GetPublishedJobInfo]
- @JobId int,@EmployerId nvarchar(128)
- as
- select logoImage ,CONVERT(DATE,GETDATE()) from EmployerInfoes where id=@EmployerId
-
- select jobName,PublishedDate ,
- DATEDIFF(DD,DurationAvailableForApply,current_timestamp) - CASE WHEN
- (MONTH(DurationAvailableForApply) > MONTH(current_timestamp)) OR (MONTH(DurationAvailableForApply) = MONTH(current_timestamp)
- AND DAY(DurationAvailableForApply) > DAY(current_timestamp)) THEN 1 ELSE 0 END
- from jobs where Id=@JobId
-
- select COUNT(*) from ApplyForJobs
- where JobId=@JobId
-
- select COUNT(*) FROM JobViewNumbers
- WHERE JobId=@JobId
-
- select PersonalPhotoImage , firstName+middleName+lastName ,phoneNumber
- , Email ,gender,country
- from JobSeekerInfoes where id=(select UserId from ApplyForJobs where JobId=@JobId)
-