Is the Synatx correct??

  • hi !!Im in a need of guidance in solving a query.

    vw_ApplicationsReceived is aview from which i want to retrieve some Specified fields.the query is to

    find the candidate details from the view where candidateApplicationId(Fk n PK) in CandidateApplicationinFolder table=candidateApplicationId in vw_ApplicationsReceived

    & FolderId is the Parameter in stored proc. which is FK in CandidateApplicationinFolder table.

    Iwant to know whether the logic is correct??

    ALTER PROCEDURE dbo.GetDetailOfFolder

    (

    @FolderId int

    )

    AS

    SET NOCOUNT ON;

    SELECT CandidateId, VacancyId, DateOfApplication, ReceivedThrough, CityId, DateOfBirth,

    Education, Experience, ContactNo1, EmailId,CityName, ContactNo2, StateId, VacancyCode, Title, FirstName,

    DesignationId, LastName, MiddleName, InsertedByCandidate, MediaId,ExpectedSalary,

    (SELECT CandidateApplicationId

    FROM Recruitment_CandidateApplicationInFolder

    WHERE (CandidateApplicationId=V.CandidateApplicationId)AND FolderId=@FolderId)

    FROM vw_ApplicationsReceived AS V

    RETURN

  • [font="Verdana"]Have you tried to execute the Select statement in your SProc and tally the o/p whether it is desired o/p? If o/p data is desired data then your logic is correct.

    Mahesh[/font]

    MH-09-AM-8694

  • As long as you are getting the desired results,i dont find anything wrong with the logic

    sunitha

    ---
    Thinking is the hardest work there is, which is the probable reason so few engage in it.

    Sunitha
    😎

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply