TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Check Exists Value Database in SQL
Pintoo Yadav
Aug 27
2015
Code
1.4
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
USE[golivecode.com]
GO
/****** Object: StoredProcedure [dbo].[SP_Holiday] Script
Date
: 08/25/2015 17:13:00 ******/
SET
ANSI_NULLS
ON
GO
SET
QUOTED_IDENTIFIER
ON
GO
create
PROCEDURE
[dbo].[SP_golivecode]@ CDate
varchar
(20), @GridID
varchar
(20)
AS
BEGIN
begin
if exists(
SELECT
reason
FROM
HolidayBankMaster
WHERE
convert
(datetime, days, 103) =
convert
(datetime, @CDate, 103)
and
GridID = @GridID)
SELECT
reason
FROM
HolidayBankMaster
WHERE
convert
(datetime, days, 103) =
convert
(datetime, @CDate, 103)
and
GridID = @GridID
else
select
0
as
reason
end
END
SQL
Database
Check duplicate Value in SQL