--AUTHOR: MANOJ KUMAR
--PURPOSE: AUTHONTICATE USER
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[INSERT_USER]
(
@LOGIN_ID VARCHAR(100),
@PASSWORD VARCHAR(20),
@GENDER VARCHAR(10),
@DOB datetime,
@FIRST_NAME VARCHAR(100),
@LAST_NAME VARCHAR(100),
@ALTERNATE_EMAIL VARCHAR(100),
@COUNTRY BIGINT,
@STATE BIGINT,
@CITY BIGINT,
@PHONE_NO VARCHAR(100),
@MOBILE_NO VARCHAR(100),
@TOTAL_EXPERIENCE VARCHAR(50),
@CURRENT_EMPLOYER VARCHAR(200),
@ANNUAL_SALARY VARCHAR(100),
@FUNC_AREA BIGINT,
@INDUSTRY BIGINT,
@KEY_SKILLS VARCHAR(500),
@SKILL_EXPERIENCE VARCHAR(50),
@SKILL_LEVEL BIGINT,
@PREFERED_JOB_LOCATION BIGINT,
@EXPECTED_ROLE VARCHAR(500),
@EXPECTED_PACKAGE VARCHAR(100),
@RESUME_HEADLINE VARCHAR(200),
@RESUME VARCHAR(5000),
@GRADUATION BIGINT,
@GRAD_SPECIFICATION VARCHAR(300),
@GRAD_INSTITUTE VARCHAR(300),
@POST_GRADUATION BIGINT,
@PGRAD_SPECIFICATION VARCHAR(300),
@PGRAD_INSTITUTE VARCHAR(300),
@DOCTRATE BIGINT,
@DOC_SPECIFICATION VARCHAR(300),
@DOC_INSTITUTE VARCHAR(300),
@COURSE_ONE VARCHAR(300),
@COURSE_TWO VARCHAR(300),
@COURSE_THREE VARCHAR(300),
@OUTPUT VARCHAR(200) OUTPUT
)
AS
BEGIN
DECLARE @TranName VARCHAR(10)
SELECT @TranName = 'MyTransaction';
--BEGIN TRANSACTION @TranName;
INSERT INTO USER_REGISTRATION
(
LOGIN_ID,PASSWORD,GENDER,DATE_OF_BIRTH,USER_FIRST_NAME,USER_LAST_NAME,
ALTERNATE_EMAIL_ID,COUNTRY_ID_FK,STATE_ID_FK,CITY_ID_FK,PHONE_NO,MOBILE_NO,TOTAL_EXPERIENCE,
CURRENT_EMPLOYER,ANNUAL_SALARY,FUNC_AREA_ID_FK,INDUSTRY_ID_FK,KEY_SKILLS,
SKILL_EXPERIENCE,SKILL_LEVEL,PREFERED_JOB_LOCATION_ID_FK,
EXPECTED_ROLE_ID_FK,EXPECTED_PACKAGE,RESUME_HEADLINE,RESUME,GRADUATION_ID_FK,
GRAD_SPECIFICATION,GRAD_INSTITUTE,POST_GRADUATION_ID_FK,
PGRAD_SPECIFICATION,PGRAD_INSTITUTE,DOCTRATE_ID_FK,DOC_SPECIFICATION,DOC_INSTITUTE,
COURSE_ONE,COURSE_TWO,COURSE_THREE,IS_RECSTATUS,REC_DATE
)
VALUES (
@LOGIN_ID,@PASSWORD,@GENDER,@DOB,@FIRST_NAME,@LAST_NAME,
@ALTERNATE_EMAIL,@COUNTRY,@STATE,@CITY,@PHONE_NO,@MOBILE_NO,@TOTAL_EXPERIENCE,
@CURRENT_EMPLOYER,@ANNUAL_SALARY,@FUNC_AREA,@INDUSTRY,@KEY_SKILLS,
@SKILL_EXPERIENCE,@SKILL_LEVEL,@PREFERED_JOB_LOCATION,
@EXPECTED_ROLE,@EXPECTED_PACKAGE,@RESUME_HEADLINE,@RESUME,@GRADUATION,
@GRAD_SPECIFICATION,@GRAD_INSTITUTE,@POST_GRADUATION,@PGRAD_SPECIFICATION,
@PGRAD_INSTITUTE,@DOCTRATE,@DOC_SPECIFICATION,@DOC_INSTITUTE,
@COURSE_ONE,@COURSE_TWO,@COURSE_THREE,1,GETDATE()
);
BEGIN
SELECT @OUTPUT = (SELECT MAX(ISNULL(USER_ID_PK,1)) FROM USER_REGISTRATION WHERE IS_RECSTATUS = 1);
END
RETURN @OUTPUT;
IF @@ERROR = 0
BEGIN
COMMIT TRANSACTION @TranName;
END
ELSE
BEGIN
ROLLBACK TRANSACTION @TranName;
END
END
--PURPOSE: AUTHONTICATE USER
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[INSERT_USER]
(
@LOGIN_ID VARCHAR(100),
@PASSWORD VARCHAR(20),
@GENDER VARCHAR(10),
@DOB datetime,
@FIRST_NAME VARCHAR(100),
@LAST_NAME VARCHAR(100),
@ALTERNATE_EMAIL VARCHAR(100),
@COUNTRY BIGINT,
@STATE BIGINT,
@CITY BIGINT,
@PHONE_NO VARCHAR(100),
@MOBILE_NO VARCHAR(100),
@TOTAL_EXPERIENCE VARCHAR(50),
@CURRENT_EMPLOYER VARCHAR(200),
@ANNUAL_SALARY VARCHAR(100),
@FUNC_AREA BIGINT,
@INDUSTRY BIGINT,
@KEY_SKILLS VARCHAR(500),
@SKILL_EXPERIENCE VARCHAR(50),
@SKILL_LEVEL BIGINT,
@PREFERED_JOB_LOCATION BIGINT,
@EXPECTED_ROLE VARCHAR(500),
@EXPECTED_PACKAGE VARCHAR(100),
@RESUME_HEADLINE VARCHAR(200),
@RESUME VARCHAR(5000),
@GRADUATION BIGINT,
@GRAD_SPECIFICATION VARCHAR(300),
@GRAD_INSTITUTE VARCHAR(300),
@POST_GRADUATION BIGINT,
@PGRAD_SPECIFICATION VARCHAR(300),
@PGRAD_INSTITUTE VARCHAR(300),
@DOCTRATE BIGINT,
@DOC_SPECIFICATION VARCHAR(300),
@DOC_INSTITUTE VARCHAR(300),
@COURSE_ONE VARCHAR(300),
@COURSE_TWO VARCHAR(300),
@COURSE_THREE VARCHAR(300),
@OUTPUT VARCHAR(200) OUTPUT
)
AS
BEGIN
DECLARE @TranName VARCHAR(10)
SELECT @TranName = 'MyTransaction';
--BEGIN TRANSACTION @TranName;
INSERT INTO USER_REGISTRATION
(
LOGIN_ID,PASSWORD,GENDER,DATE_OF_BIRTH,USER_FIRST_NAME,USER_LAST_NAME,
ALTERNATE_EMAIL_ID,COUNTRY_ID_FK,STATE_ID_FK,CITY_ID_FK,PHONE_NO,MOBILE_NO,TOTAL_EXPERIENCE,
CURRENT_EMPLOYER,ANNUAL_SALARY,FUNC_AREA_ID_FK,INDUSTRY_ID_FK,KEY_SKILLS,
SKILL_EXPERIENCE,SKILL_LEVEL,PREFERED_JOB_LOCATION_ID_FK,
EXPECTED_ROLE_ID_FK,EXPECTED_PACKAGE,RESUME_HEADLINE,RESUME,GRADUATION_ID_FK,
GRAD_SPECIFICATION,GRAD_INSTITUTE,POST_GRADUATION_ID_FK,
PGRAD_SPECIFICATION,PGRAD_INSTITUTE,DOCTRATE_ID_FK,DOC_SPECIFICATION,DOC_INSTITUTE,
COURSE_ONE,COURSE_TWO,COURSE_THREE,IS_RECSTATUS,REC_DATE
)
VALUES (
@LOGIN_ID,@PASSWORD,@GENDER,@DOB,@FIRST_NAME,@LAST_NAME,
@ALTERNATE_EMAIL,@COUNTRY,@STATE,@CITY,@PHONE_NO,@MOBILE_NO,@TOTAL_EXPERIENCE,
@CURRENT_EMPLOYER,@ANNUAL_SALARY,@FUNC_AREA,@INDUSTRY,@KEY_SKILLS,
@SKILL_EXPERIENCE,@SKILL_LEVEL,@PREFERED_JOB_LOCATION,
@EXPECTED_ROLE,@EXPECTED_PACKAGE,@RESUME_HEADLINE,@RESUME,@GRADUATION,
@GRAD_SPECIFICATION,@GRAD_INSTITUTE,@POST_GRADUATION,@PGRAD_SPECIFICATION,
@PGRAD_INSTITUTE,@DOCTRATE,@DOC_SPECIFICATION,@DOC_INSTITUTE,
@COURSE_ONE,@COURSE_TWO,@COURSE_THREE,1,GETDATE()
);
BEGIN
SELECT @OUTPUT = (SELECT MAX(ISNULL(USER_ID_PK,1)) FROM USER_REGISTRATION WHERE IS_RECSTATUS = 1);
END
RETURN @OUTPUT;
IF @@ERROR = 0
BEGIN
COMMIT TRANSACTION @TranName;
END
ELSE
BEGIN
ROLLBACK TRANSACTION @TranName;
END
END
No comments:
Post a Comment