Try to search your question here, if you can't find : Ask Any Question Now ?

I want to give information according to profession using 'Trigger'

HomeCategory: stackoverflowI want to give information according to profession using 'Trigger'
Avatarsourav asked 1 month ago

Trigger‘ I want to give information according to the profession using. For example; When I entered the engineer I added ‘engineer’. This is his name and surname. ‘ as.

ALTER TRIGGER tigger_example
ON information
AFTER INSERT
AS
IF EXISTS(SELECT * FROM inserted WHERE Person_Job='Engineer')
BEGIN
    PRINT 'Engineer added to list.'+
    'Person Info:' +
    'Name : ' + person_firstname + -- not work
    'Surname : ' + person_lastname -- not work
END
ELSE IF EXISTS(SELECT * FROM inserted WHERE Person_Job='Architect')
BEGIN
    PRINT 'Architect added to list.'+
    'Person Info:' +
    'Name : ' + person_firstname + -- not work
    'Surname : ' + person_lastname -- not work
END
ELSE
BEGIN
    PRINT 'An undefined contact has been added to the list.'
END
1 Answers
Best Answer
AvatarArben answered 1 month ago
Your Answer

4 + 17 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com