Hi
I working on one project. This project like a job Seeker. I think every Guy's familiar all ready Similar Type Job.I want This type of Work use in my Project. i have done all this but a bit Problem is stop my working.Suppose I run this Procedure like this type
exec [sp_job_SimilarJob] 'sql'
My Job Opening Table like this
SrNo Skill Required
1 Sql,Java,mvc
2 Sql,c#
3 java,php,Sql and So many type of data this type.
when i exec this procedure bulk of data return like this
select @my=o.SrNo from tbl_Job_OrgOpeningDetail o where SkillsRequired like '%' + Sql+'%'
The above query return both of Row like this
SrNo.
1
2
3
my Complete Store Procedure show below
ALTER proc [dbo].[sp_job_SimilarJob]
(
@products nvarchar(50)=null
)
as
create table #mytb(dd varchar(max))
Declare @individual varchar(20) = null
declare @my varchar(max)=null
declare @testing int=0
WHILE LEN(@products) >= 0
BEGIN
IF PATINDEX('%,%',@products) > 0
BEGIN
SET @individual = SUBSTRING(@products, 0, PATINDEX('%,%',@products))
select @my=o.OrgJob_id from tbl_Job_OrgOpeningDetail o where SkillsRequired like '%' + @individual +'%'
SET @products = SUBSTRING(@products, LEN(@individual + ',') + 1, LEN(@products))
insert into #mytb values(@my)
END
ELSE
BEGIN
SET @individual = @products
SET @products = NULL
insert into #mytb values(@my)
END
END
select org.SkillsRequired, org.JobCatagary ,cty.City,fa.FuncationalArea,orgdt.OrganisationName,jq.Qualification,
org.OrgDt_id,org.MinimumExprinceYear,org.JobDescription ,org.OrgJob_id,
(select top 1 VoteCount from Tbl_Job_Vote_UP_Down where OrgJob_ID=org.OrgJob_id order by VoteCount Desc )as VoteCount
from tbl_Job_OrgOpeningDetail org
where org.OrgJob_id in (select dd from #mytb)
return
exec [sp_job_SimilarJob] 'sql,c++,java'</blockquote>
my question is how can hold multiple values in temp table. For any query hit to comment i am ready for reply.
Thanks Advance
Happy Coding ☺
jsb