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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
karthik parcha
NA
153
92.8k
ERROR:Subquery returned more than 1 value.Please help me
Nov 1 2011 3:01 AM
ERROR:Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
DECLARE @Expiration DATETIME;
DECLARE @Signeddate VARCHAR(50);
DECLARE @TextMarketing VARCHAR(50);
Select @Signeddate=(SELECT SCHEDULEDTIME FROM #TEMP_SB );
SET @Expiration=(DATEADD(DAY,-1,(DATEADD(YEAR,1,@Signeddate))))
If(@Signeddate<=@Expiration)
BEGIN
SET @TextMarketing='ACTIVE';
END
else if(@Expiration is not null OR @Expiration < GETDATE())
BEGIN
SET @TextMarketing='INACTIVE';
END
UPDATE #TEMP_SB SET TEXT_MARKETING_STATUS=@TextMarketing
Reply
Answers (
7
)
Testing DML Trigger in SQL Server
Join Tables From Different Databases