# Procedure: uspSearchCandidateResumes

## Properties

Property | Value
--- | ---
Name | uspSearchCandidateResumes
ID | 231671873
Schema | dbo
Owner | dbo
Type | SQL STORED PROCEDURE
Execute As | Caller
Encrypted |
ANSI NULLS |
Uses Quoted Identifier |
Published |
Schema Published |
Execution Replicated |
Replication Serializable Only |
Skips Replication Constraints |
Is Recompiled |
Uses Database Collation |
Null on Null Input |
MS Shipped |
Modify Date | 8/8/2010 5:23:47 PM
Create Date | 8/8/2010 5:23:47 PM

## Extended Properties

No extended properties defined.

## Permissions

No object level permissions defined.

## Parameters

Parameter Name | Datatype | Output | Cursor Ref | Readonly | Has Default Value | Default Value | Xml Collection Name | Description
--- | --- | --- | --- | --- | --- | --- | --- | ---
@searchString | nvarchar(1000) |  |  |  |  |  |  |
@useInflectional | bit |  |  |  |  |  |  |
@useThesaurus | bit |  |  |  |  |  |  |
@language | int |  |  |  |  |  |  |

## Objects that depend on [uspSearchCandidateResumes]

- dbo.uspSearchCandidateResumes

## Objects on which [uspSearchCandidateResumes] depends

- dbo.uspSearchCandidateResumes
  - HumanResources.JobCandidate
    - HumanResources.Employee
      - dbo.Flag
      - Person.Person
        - dbo.Name
        - dbo.NameStyle
        - Demographics.exist
        - Person.AdditionalContactInfoSchemaCollection
        - Person.BusinessEntity
        - Person.IndividualSurveySchemaCollection
    - HumanResources.HRResumeSchemaCollection

## SQL

Script
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE PROCEDURE [dbo].[uspSearchCandidateResumes] @searchString [nvarchar](1000), @useInflectional [bit]=0, @useThesaurus [bit]=0, @language[int]=0 WITH EXECUTE AS CALLER AS BEGIN SET NOCOUNT ON; DECLARE @string nvarchar(1050) IF @language = NULL OR @language = 0 BEGIN SELECT @language =CONVERT(int, serverproperty('lcid')) END IF @useThesaurus = 1 AND @useInflectional = 1 BEGIN SELECT FT_TBL.[JobCandidateID], KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL INNER JOIN FREETEXTTABLE([HumanResources].[JobCandidate],*, @searchString,LANGUAGE @language) AS KEY_TBL ON FT_TBL.[JobCandidateID] =KEY_TBL.[KEY] END ELSE IF @useThesaurus = 1 BEGIN SELECT @string ='FORMSOF(THESAURUS,"'+@searchString +'"'+')' SELECT FT_TBL.[JobCandidateID], KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL INNER JOIN CONTAINSTABLE([HumanResources].[JobCandidate],*, @string,LANGUAGE @language) AS KEY_TBL ON FT_TBL.[JobCandidateID] =KEY_TBL.[KEY] END ELSE IF @useInflectional = 1 BEGIN SELECT @string ='FORMSOF(INFLECTIONAL,"'+@searchString +'"'+')' SELECT FT_TBL.[JobCandidateID], KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL INNER JOIN CONTAINSTABLE([HumanResources].[JobCandidate],*, @string,LANGUAGE @language) AS KEY_TBL ON FT_TBL.[JobCandidateID] =KEY_TBL.[KEY] END ELSE --base case, plain CONTAINSTABLE BEGIN SELECT @string='"'+@searchString +'"' SELECT FT_TBL.[JobCandidateID],KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL INNER JOIN CONTAINSTABLE([HumanResources].[JobCandidate],*,@string,LANGUAGE @language) AS KEY_TBL ON FT_TBL.[JobCandidateID] =KEY_TBL.[KEY] END END;

#### See also

List of Procedures