Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8967299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:12:42+00:00 2026-06-15T17:12:42+00:00

my update trigger BEGIN DECLARE s VARCHAR(100); IF (OLD.authUId <> NEW.authUId) THEN SET s

  • 0

my update trigger

BEGIN
DECLARE s VARCHAR(100);
IF (OLD.authUId <> NEW.authUId) THEN SET s = CONCAT(s,'&authUId=', OLD.authUId); END IF;
IF (OLD.autPId <> NEW.autPId) THEN SET s = CONCAT(s,'&autPId=', OLD.autPId); END IF;
.....

INSERT INTO l_dblog(src,newId,oldValue) VALUE('auth_up',new.authId,s);
END

inserted row oldValue column always null insert, whats my problem ?

I have delete trigger is succes work

my Delete trigger:

 BEGIN
      DECLARE s VARCHAR(60);
      SET s = CONCAT('&authUId=', OLD.authUId,'&autPId=', OLD.autPId,'&authTypeId=', OLD.authTypeId,'&authValue=', OLD.authValue);   
    INSERT INTO l_dblog(src,newId,oldValue) 
     VALUE('auth_del',OLD.authId,s);
    END

Thank you…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:12:44+00:00Added an answer on June 15, 2026 at 5:12 pm

    Set default value of variable s as blank in your update query and then check weather trigger is working or not. If not than what error you got after running the trigger.

    BEGIN
    DECLARE s VARCHAR(100) DEFAULT '';
    IF (OLD.authUId <> NEW.authUId) THEN SET s = CONCAT(s,'&authUId=', OLD.authUId); END IF;
    IF (OLD.autPId <> NEW.autPId) THEN SET s = CONCAT(s,'&autPId=', OLD.autPId); END IF;
    .....
    
    INSERT INTO l_dblog(src,newId,oldValue) VALUE('auth_up',new.authId,s);
    END
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

CREATE TRIGGER google_inventory BEFORE UPDATE ON `cataloginventory_stock_item` FOR EACH ROW BEGIN update `catalog_product_entity_int` set
CREATE TRIGGER event_house_dealed AFTER UPDATE ON house FOR EACH ROW BEGIN DECLARE finished INT;
I have the following trigger: BEGIN DECLARE @email varchar(200) DECLARE @jobcode int DECLARE @status
I create trigger CREATE TRIGGER PartnersTrigger on Partners INSTEAD OF INSERT AS BEGIN SET
I am trying to create Update trigger which should be invoked only if the
Hi iam trying to make an update trigger in my database. But i get
I'm trying to write an after update trigger that does a batch update on
I am trying to use an update trigger in SQL Server 2000 so that
I would like to fire an UPDATE trigger only if a certain fields has
If I raise an error in an AFTER UPDATE trigger in Sql Server 2005,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.