List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:December 15 2009 5:39am
Subject:Re: error while creating trigger
View as plain text  
Jeetendra,

>ERROR 1054 (42S22): Unknown column 'CAMPAIGN_ID' in 'OLD'
>But this column is exist in DELETED_CONSUMER_ACTION_AUDIT table.

But does it exist in consumer_profile?

PB

-----

Jeetendra Ranjan wrote:
> Hi,
>
> I am getting error while creating a simple trigger
>
>
>
> mysql> CREATE  TRIGGER CONSUMER_PROFILE_before_delete BEFORE DELETE ON
> CONSUMER_PROFILE FOR EACH ROW
>     -> begin 
>     -> INSERT INTO
> DELETED_CONSUMER_PROFILE(CONSUMER_ID,CONSUMER_TYPE_ID,ENTERPRISE_URL_ID,CONSUMER_FIRST_NAME,CONSUMER_MIDDLE_INITIAL,CONSUMER_LAST_NAME,DATE_OF_BIRTH,GENDER,MARITAL_STATUS,MARRIED_TO,LOCALE_ID,PROFILE_PHOTO_PATH,STATUS,SKIP_STEP,LAST_MOD_TIME,LAST_MOD_BY
> ) 
>     ->
> VALUES(old.CONSUMER_ID,old.CONSUMER_TYPE_ID,old.ENTERPRISE_URL_ID,old.CONSUMER_FIRST_NAME,old.CONSUMER_MIDDLE_INITIAL,old.CONSUMER_LAST_NAME,old.DATE_OF_BIRTH,old.GENDER,old.MARITAL_STATUS,old.MARRIED_TO,old.LOCALE_ID,old.PROFILE_PHOTO_PATH,old.STATUS,old.SKIP_STEP,old.LAST_MOD_TIME,old.LAST_MOD_BY
> );
>     -> INSERT INTO
> DELETED_CONSUMER_ACTION_AUDIT(CONSUMER_ID,CAMPAIGN_ID,CAMPAIGN_ACTION_ID,STATE_ID,LAST_MOD_TIME)
> VALUES(old.CONSUMER_ID,old.CAMPAIGN_ID,old.CAMPAIGN_ACTION_ID,old.STATE_ID,old.LAST_MOD_TIME);
>     -> END;
>     -> //
>
>
> ERROR 1054 (42S22): Unknown column 'CAMPAIGN_ID' in 'OLD'
>
> But this column is exist in DELETED_CONSUMER_ACTION_AUDIT table.
>
> What are the possible causes of this error ?
>
>
>
>
> Thanks in advance 
> Jeetendra Ranjan
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.427 / Virus Database: 270.14.107/2564 - Release Date: 12/14/09 07:37:00
>
>   

Thread
error while creating triggerJeetendra Ranjan15 Dec
  • Re: error while creating triggerPeter Brawley15 Dec