How to write on two tables so that --7 colums form one table and Value of a single Column distributed in N Rows MAtch and retun Matched Data
My First table has -- columns
Keyword1
Keyword2
Keyword3
Keyword4
Keyword5
Keyword6
Keyword7
and my second table contains two coulmns User_Id and Choice
as he can select as much items so his respected choice's Id is stored in second table like--
User_Id--Choice
2 ---121
2 ---122
2 ---123
2 ---124
2 ---125
so can i MAtch data through
Table1 (Keywods 1 to Keywords7 ) and Table2(Choice)
create Script of Table1 is--
CREATE TABLE [dbo].[JobForm](
[Job_Id] [int] NOT NULL,
[Recruiter_id] [int] NULL,
[JobTitle] [varchar](100) NULL,
[Location] [varchar](50) NULL,
[Category] [varchar](50) NULL,
[MinExp] [varchar](20) NULL,
[MaxExp] [varchar](20) NULL,
[Body] [varchar](2000) NULL,
[Keyword1] [varchar](50) NULL,
[Keyword2] [varchar](50) NULL,
[Keyword3] [varchar](50) NULL,
[Keyword4] [varchar](50) NULL,
[Keyword5] [varchar](50) NULL,
[Keyword6] [varchar](50) NULL,
[Keyword7] [varchar](50) NULL,
[Investor1] [varchar](50) NULL,
[Investor2] [varchar](50) NULL,
[Investor3] [varchar](50) NULL,
[Investor4] [varchar](50) NULL,
[Investor5] [varchar](50) NULL,
[CreatedDate] [datetime] NULL
) ON [PRIMARY]
and create Script of Second Script is---
CREATE TABLE [dbo].[UserFeedSelection](
[User_Id] [int] NOT NULL,
[JobFeed] [int] NOT NULL,
PRIMARY KEY CLUSTERED
(
[User_Id] ASC,
[JobFeed] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
i have to match
Keyword1
Keyword2
Keyword3
Keyword4
Keyword5
Keyword6
Keyword7
with
Choice column below as having N number of choices for a particular USer_Id
User_Id--Choice
2 ---121
2 ---122
2 ---123
2 ---124
2 ---125
Pls Help ..Thanks in Advance