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
Basit Khan
NA
336
122.5k
Variable with Concatenation in SQL
Aug 19 2015 4:45 AM
Dear All,
I declare three variable in below trigger, now i want to Concatenation with
@AllVar.
When i do Concatenation got error Incorrect syntax near '+'. Why this?
create TRIGGER <TriggerName>
ON [dbo].<TableName>
FOR INSERT
AS
BEGIN
DECLARE @us_email varchar(500);
DECLARE @CallNo varchar(500);
DECLARE @AllVar varchar(500);
SET NOCOUNT ON;
IF EXISTS (SELECT * FROM inserted)
BEGIN
SELECT @us_email = EmailAddress
FROM inserted i,
Users u
SELECT @CallNo ='Notification :Call Number is :' + SPACE(1)+ CallNumber
FROM inserted
@AllVar='The Call Number is '+ @CallNo + ' and some Text'
END
END
GO
Thanks
Basit
Reply
Answers (
2
)
Send SMS in SQL through trigger
Plz help me in a query..